org.apache.lucene.search
public class DisjunctionSumScorer extends Scorer
ConjunctionScorer
.
This Scorer implements {@link Scorer#skipTo(int)} and uses skipTo() on the given Scorers.
Field Summary | |
---|---|
protected int | nrMatchers The number of subscorers that provide the current match. |
protected List | subScorers The subscorers. |
Constructor Summary | |
---|---|
DisjunctionSumScorer(List subScorers, int minimumNrMatchers) Construct a DisjunctionScorer . | |
DisjunctionSumScorer(List subScorers) Construct a DisjunctionScorer , using one as the minimum number
of matching subscorers. |
Method Summary | |
---|---|
protected boolean | advanceAfterCurrent() Advance all subscorers after the current document determined by the
top of the scorerQueue .
|
int | doc() |
Explanation | explain(int doc) Gives and explanation for the score of a given document. |
boolean | next() |
int | nrMatchers() Returns the number of subscorers matching the current document.
|
float | score() Returns the score of the current document matching the query.
|
boolean | skipTo(int target) Skips to the first match beyond the current whose document number is
greater than or equal to a given target.
|
DisjunctionScorer
.Parameters: subScorers A collection of at least two subscorers. minimumNrMatchers The positive minimum number of subscorers that should
match to match this query.
When minimumNrMatchers
is bigger than
the number of subScorers
,
no matches will be produced.
When minimumNrMatchers equals the number of subScorers,
it more efficient to use ConjunctionScorer
.
DisjunctionScorer
, using one as the minimum number
of matching subscorers.scorerQueue
.
Repeat until at least the minimum number of subscorers match on the same
document and all subscorers are after that document or are exhausted.
scorerQueue
has at least minimumNrMatchers
available. At least the scorer with the minimum document number will be advanced.Returns: true iff there is a match.
In case there is a match, currentDoc, currentSumScore,
and nrMatchers describe the match.
UNKNOWN: Investigate whether it is possible to use skipTo() when the minimum number of matchers is bigger than one, ie. try and use the character of ConjunctionScorer for the minimum number of matchers.
UNKNOWN: Show the resulting score. See BooleanScorer.explain() on how to do this.
Parameters: target The target document number.
Returns: true iff there is such a match.