|
||||||||||
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.DisjunctionSumScorer
public class DisjunctionSumScorer
A Scorer for OR like queries, counterpart of Lucene's ConjunctionScorer
.
This Scorer implements 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)
Construct a DisjunctionScorer , using one as the minimum number
of matching subscorers. |
|
DisjunctionSumScorer(List subScorers,
int minimumNrMatchers)
Construct a DisjunctionScorer . |
Method Summary | |
---|---|
protected boolean |
advanceAfterCurrent()
Advance all subscorers after the current document determined by the top of the scorerQueue . |
int |
doc()
Returns the current document number matching the query. |
Explanation |
explain(int doc)
Gives and explanation for the score of a given document. |
boolean |
next()
Advances to the next document matching the query. |
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. |
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 final List subScorers
protected int nrMatchers
Constructor Detail |
---|
public DisjunctionSumScorer(List subScorers, int minimumNrMatchers)
DisjunctionScorer
.
subScorers
- A collection of at least two subscorers.minimumNrMatchers
- The positive minimum number of subscorers that should
match to match this query.
minimumNrMatchers
is bigger than
the number of subScorers
,
no matches will be produced.
ConjunctionScorer
.public DisjunctionSumScorer(List subScorers)
DisjunctionScorer
, using one as the minimum number
of matching subscorers.
Method Detail |
---|
public boolean next() throws IOException
Scorer
next
in class Scorer
Scorer.explain(int)
method should not be used.
IOException
protected boolean advanceAfterCurrent() throws IOException
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.
IOException
public float score() throws IOException
next()
is called the first time.
score
in class Scorer
IOException
public int doc()
Scorer
Scorer.next()
is called the first time.
doc
in class Scorer
public int nrMatchers()
next()
is called the first time.
public boolean skipTo(int target) throws IOException
explain(int)
method should not be used.
skipTo
in class Scorer
target
- The target document number.
IOException
public Explanation explain(int doc) throws IOException
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 |