public class SpanScorer extends Scorer
| Modifier and Type | Field and Description |
|---|---|
protected int |
doc |
protected boolean |
firstTime |
protected float |
freq |
protected boolean |
more |
protected byte[] |
norms |
protected Spans |
spans |
protected float |
value |
protected Weight |
weight |
| Modifier | Constructor and Description |
|---|---|
protected |
SpanScorer(Spans spans,
Weight weight,
Similarity similarity,
byte[] norms) |
| Modifier and Type | Method and Description |
|---|---|
int |
doc()
Returns the current document number.
|
Explanation |
explain(int doc)
Returns an explanation of the score for a document.
|
boolean |
next()
Moves to the next docId in the set.
|
float |
score()
Returns the score of the current document matching the query.
|
protected boolean |
setFreqCurrentDoc() |
boolean |
skipTo(int target)
Skips entries to the first beyond the current whose document number is
greater than or equal to target.
|
getSimilarity, score, scoreprotected Spans spans
protected Weight weight
protected byte[] norms
protected float value
protected boolean firstTime
protected boolean more
protected int doc
protected float freq
protected SpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms) throws IOException
IOExceptionpublic boolean next()
throws IOException
DocIdSetIteratornext in class DocIdSetIteratorIOExceptionpublic boolean skipTo(int target)
throws IOException
DocIdSetIteratorReturns true iff there is such an entry.
Behaves as if written:
boolean skipTo(int target) {
do {
if (!next())
return false;
} while (target > doc());
return true;
}
Some implementations are considerably more efficient than that.skipTo in class DocIdSetIteratorIOExceptionprotected boolean setFreqCurrentDoc()
throws IOException
IOExceptionpublic int doc()
DocIdSetIterator This is invalid until DocIdSetIterator.next() is called for the first time.
doc in class DocIdSetIteratorpublic float score()
throws IOException
ScorerDocIdSetIterator.next() or DocIdSetIterator.skipTo(int)
is called the first time.score in class ScorerIOExceptionpublic Explanation explain(int doc) throws IOException
ScorerDocIdSetIterator.next(), DocIdSetIterator.skipTo(int) and
Scorer.score(HitCollector) methods should not be used.explain in class Scorerdoc - The document number for the explanation.IOExceptionCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.