|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.search.Scorer
org.apache.lucene.search.spans.SpanScorer
public class SpanScorer
Public for extension only.
Field Summary | |
---|---|
protected int |
doc
|
protected boolean |
firstTime
|
protected float |
freq
|
protected boolean |
more
|
protected byte[] |
norms
|
protected Spans |
spans
|
protected float |
value
|
protected Weight |
weight
|
Constructor Summary | |
---|---|
protected |
SpanScorer(Spans spans,
Weight weight,
Similarity similarity,
byte[] norms)
|
Method Summary | |
---|---|
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 next document matching the query. |
float |
score()
Returns the score of the current document matching the query. |
protected boolean |
setFreqCurrentDoc()
|
boolean |
skipTo(int target)
Skips to the first match beyond the current whose document number is greater than or equal to a given target. |
Methods inherited from class org.apache.lucene.search.Scorer |
---|
getSimilarity, score, score |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Spans spans
protected Weight weight
protected byte[] norms
protected float value
protected boolean firstTime
protected boolean more
protected int doc
protected float freq
Constructor Detail |
---|
protected SpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms) throws IOException
IOException
Method Detail |
---|
public boolean next() throws IOException
Scorer
next
in class Scorer
Scorer.explain(int)
method should not be used.
IOException
public boolean skipTo(int target) throws IOException
Scorer
Scorer.explain(int)
method should not be used.
skipTo
in class Scorer
target
- The target document number.
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.
IOException
protected boolean setFreqCurrentDoc() throws IOException
IOException
public int doc()
Scorer
Scorer.next()
is called the first time.
doc
in class Scorer
public float score() throws IOException
Scorer
Scorer.next()
or Scorer.skipTo(int)
is called the first time.
score
in class Scorer
IOException
public Explanation explain(int doc) throws IOException
Scorer
Scorer.next()
, Scorer.skipTo(int)
and
Scorer.score(HitCollector)
methods should not be used.
explain
in class Scorer
doc
- The document number for the explanation.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |