org.apache.lucene.search.spans
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 matching the query.
|
Explanation |
explain(int doc)
Returns an explanation of the score for a document.
|
boolean |
next()
Advances to the document matching this Scorer with the lowest doc Id
greater than the current value of
Scorer.doc() (or to the matching
document with the lowest doc Id if next has never been called on
this Scorer). |
float |
score()
Returns the score of the current document matching the query.
|
protected boolean |
setFreqCurrentDoc() |
boolean |
skipTo(int target)
Skips to the document matching this Scorer with the lowest doc Id
greater than or equal to a given 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
ScorerScorer.doc() (or to the matching
document with the lowest doc Id if next has never been called on
this Scorer).
When this method is used the Scorer.explain(int) method should not
be used.
next in class ScorerIOExceptionBooleanQuery.setAllowDocsOutOfOrder(boolean)public boolean skipTo(int target)
throws IOException
Scorer
The behavior of this method is undefined if the target specified is
less than or equal to the current value of Scorer.doc().
Behaves as if written:
boolean skipTo(int target) {
do {
if (!next())
return false;
} while (target > doc());
return true;
}
Most implementations are considerably more efficient than that.
When this method is used the Scorer.explain(int) method should not
be used.
skipTo in class Scorertarget - The target document number.IOExceptionBooleanQuery.setAllowDocsOutOfOrder(boolean)protected boolean setFreqCurrentDoc()
throws IOException
IOExceptionpublic int doc()
ScorerScorer.next() is called the first time.public float score()
throws IOException
ScorerScorer.next() or Scorer.skipTo(int)
is called the first time.score in class ScorerIOExceptionpublic Explanation explain(int doc) throws IOException
ScorerScorer.next(), Scorer.skipTo(int) and
Scorer.score(HitCollector) methods should not be used.explain in class Scorerdoc - The document number for the explanation.IOExceptionCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.