public abstract class FilterScorer extends Scorer
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.
|Modifier and Type||Field and Description|
|Constructor and Description|
Create a new FilterScorer
Create a new FilterScorer with a specific weight
|Modifier and Type||Method and Description|
Returns the doc ID that is currently being scored.
Returns the score of the current document matching the query.
protected final Scorer in
public FilterScorer(Scorer in)
public float score() throws IOException
DocIdSetIterator.advance(int)is called on the
Scorer.iterator()the first time, or when called from within
public final int docID()
Scorer.iterator()is not positioned or
DocIdSetIterator.NO_MORE_DOCSif it has been entirely consumed.
public final DocIdSetIterator iterator()
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()
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
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.