public class SpanScorer extends Scorer
- WARNING: This API is experimental and might change in incompatible ways in the next release.
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
docID()Returns the doc ID that is currently being scored.
getMaxScore(int upTo)Return the maximum score that documents between the last
targetthat this iterator was
shallow-advancedto included and
getSpans()return the Spans for this Scorer
DocIdSetIteratorover matching documents.
score()Returns the score of the current document matching the query.
scoreCurrentDoc()Score the current doc.
public Spans getSpans()return the Spans for this Scorer
public int docID()Description copied from class:
ScorableReturns the doc ID that is currently being scored.
public 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 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
protected float scoreCurrentDoc() throws IOExceptionScore the current doc. The default implementation scores the doc with the similarity using the slop-adjusted
public final float score() throws IOExceptionDescription copied from class:
ScorableReturns the score of the current document matching the query.