org.apache.lucene.search

Class ReqExclScorer

public class ReqExclScorer extends Scorer

A Scorer for queries with a required subscorer and an excluding (prohibited) subscorer.
This Scorer implements {@link Scorer#skipTo(int)}, and it uses the skipTo() on the given scorers.
Constructor Summary
ReqExclScorer(Scorer reqScorer, Scorer exclScorer)
Construct a ReqExclScorer.
Method Summary
intdoc()
Explanationexplain(int doc)
booleannext()
floatscore()
Returns the score of the current document matching the query.
booleanskipTo(int target)
Skips to the first match beyond the current whose document number is greater than or equal to a given target.

Constructor Detail

ReqExclScorer

public ReqExclScorer(Scorer reqScorer, Scorer exclScorer)
Construct a ReqExclScorer.

Parameters: reqScorer The scorer that must match, except where exclScorer indicates exclusion.

Method Detail

doc

public int doc()

explain

public Explanation explain(int doc)

next

public boolean next()

score

public float score()
Returns the score of the current document matching the query. Initially invalid, until {@link #next()} is called the first time.

Returns: The score of the required scorer.

skipTo

public boolean skipTo(int target)
Skips to the first match beyond the current whose document number is greater than or equal to a given target.
When this method is used the {@link #explain(int)} method should not be used.

Parameters: target The target document number.

Returns: true iff there is such a match.

Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.