final class FakeScorer extends Scorer
BulkScorer
s that need to pass a Scorer
to LeafCollector.setScorer(org.apache.lucene.search.Scorer)
.Scorer.ChildScorer
Modifier and Type | Field and Description |
---|---|
(package private) int |
doc |
(package private) int |
freq |
(package private) float |
score |
Constructor and Description |
---|
FakeScorer() |
Modifier and Type | Method and Description |
---|---|
int |
docID()
Returns the doc ID that is currently being scored.
|
int |
freq()
Returns the freq of this Scorer on the current document
|
java.util.Collection<Scorer.ChildScorer> |
getChildren()
Returns child sub-scorers positioned on the current document
Note that this method should not be called on Scorers passed to
LeafCollector.setScorer(Scorer) ,
as these may be synthetic Scorers produced by BulkScorer which will throw an Exception. |
Weight |
getWeight()
returns parent Weight
|
DocIdSetIterator |
iterator()
Return a
DocIdSetIterator over matching documents. |
float |
score()
Returns the score of the current document matching the query.
|
twoPhaseIterator
public int docID()
Scorer
-1
if the Scorer.iterator()
is not positioned
or DocIdSetIterator.NO_MORE_DOCS
if it has been entirely consumed.docID
in class Scorer
DocIdSetIterator.docID()
public int freq()
Scorer
public float score()
Scorer
DocIdSetIterator.nextDoc()
or
DocIdSetIterator.advance(int)
is called on the Scorer.iterator()
the first time, or when called from within LeafCollector.collect(int)
.public DocIdSetIterator iterator()
Scorer
DocIdSetIterator
over matching documents.
The returned iterator will either be positioned on -1
if no
documents have been scored yet, DocIdSetIterator.NO_MORE_DOCS
if all documents have been scored already, or the last document id that
has been scored otherwise.
The returned iterator is a view: calling this method several times will
return iterators that have the same state.public java.util.Collection<Scorer.ChildScorer> getChildren()
Scorer
LeafCollector.setScorer(Scorer)
,
as these may be synthetic Scorers produced by BulkScorer
which will throw an Exception.getChildren
in class Scorer