- Direct Known Subclasses:
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 IOExceptionReturns the score of the current document matching the query. Initially invalid, until
DocIdSetIterator.advance(int)is called on the
Scorer.iterator()the first time, or when called from within
public final int docID()Returns the doc ID that is currently being scored. This will return
Scorer.iterator()is not positioned or
DocIdSetIterator.NO_MORE_DOCSif it has been entirely consumed.
public final DocIdSetIterator iterator()Return a
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()Optional 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