| java.lang.Object org.apache.lucene.search.Scorer org.apache.lucene.search.ReqOptSumScorer
ReqOptSumScorer | public class ReqOptSumScorer extends Scorer (Code) | | A Scorer for queries with a required part and an optional part.
Delays skipTo() on the optional part until a score() is needed.
This Scorer implements
Scorer.skipTo(int) .
|
Constructor Summary | |
public | ReqOptSumScorer(Scorer reqScorer, Scorer optScorer) Construct a ReqOptScorer .
Parameters: reqScorer - The required scorer. |
Method Summary | |
public int | doc() | public Explanation | explain(int doc) Explain the score of a document. | public boolean | next() | public float | score() Returns the score of the current document matching the query. | public boolean | skipTo(int target) |
ReqOptSumScorer | public ReqOptSumScorer(Scorer reqScorer, Scorer optScorer)(Code) | | Construct a ReqOptScorer .
Parameters: reqScorer - The required scorer. This must match. Parameters: optScorer - The optional scorer. This is used for scoring only. |
score | public float score() throws IOException(Code) | | Returns the score of the current document matching the query.
Initially invalid, until
ReqOptSumScorer.next() is called the first time.
The score of the required scorer, eventually increased by the scoreof the optional scorer when it also matches the current document. |
|
|