Methods Summary |
---|
public abstract int | doc()Returns the current document number matching the query.
Initially invalid, until {@link #next()} is called the first time.
|
public abstract org.apache.lucene.search.Explanation | explain(int doc)Returns an explanation of the score for a document.
When this method is used, the {@link #next()}, {@link #skipTo(int)} and
{@link #score(HitCollector)} methods should not be used.
|
public org.apache.lucene.search.Similarity | getSimilarity()Returns the Similarity implementation used by this scorer.
return this.similarity;
|
public abstract boolean | next()Advances to the next document matching the query.
|
public void | score(org.apache.lucene.search.HitCollector hc)Scores and collects all matching documents.
while (next()) {
hc.collect(doc(), score());
}
|
protected boolean | score(org.apache.lucene.search.HitCollector hc, int max)Expert: Collects matching documents in a range. Hook for optimization.
Note that {@link #next()} must be called once before this method is called
for the first time.
while (doc() < max) {
hc.collect(doc(), score());
if (!next())
return false;
}
return true;
|
public abstract float | score()Returns the score of the current document matching the query.
Initially invalid, until {@link #next()} or {@link #skipTo(int)}
is called the first time.
|
public abstract boolean | skipTo(int target)Skips to the first match beyond the current whose document number is
greater than or equal to a given target.
When this method is used the {@link #explain(int)} method should not be used.
|