public abstract class FilterScorer extends ScorerA
Scorer, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality. The class
FilterScoreritself simply implements all abstract methods of
Scorerwith versions that pass all requests to the contained scorer. Subclasses of
FilterScorermay further override some of these methods and may also provide additional methods and fields.
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
docID()Returns the doc ID that is currently being scored.
DocIdSetIteratorover matching documents.
score()Returns the score of the current document matching the query.
protected final Scorer in
public float score() throws IOExceptionDescription copied from class:
ScorableReturns the score of the current document matching the query.
public final int docID()Description copied from class:
ScorableReturns the doc ID that is currently being scored.
public final DocIdSetIterator iterator()Description copied from class:
DocIdSetIteratorover matching documents. The returned iterator will either be positioned on
-1if no documents have been scored yet,
DocIdSetIterator.NO_MORE_DOCSif all documents have been scored already, or the last document id that has been scored otherwise. The returned iterator is a view: calling this method several times will return iterators that have the same state.
public final TwoPhaseIterator twoPhaseIterator()Description copied from class:
ScorerOptional method: Return a
TwoPhaseIteratorview of this
Scorer. A return value of
nullindicates that two-phase iteration is not supported. Note that the returned
approximationmust advance synchronously with the
Scorer.iterator(): advancing the approximation must advance the iterator and vice-versa. Implementing this method is typically useful on
Scorers that have a high per-document overhead in order to confirm matches. The default implementation returns