Package org.apache.lucene.search
Class CoveringScorer
- java.lang.Object
-
- org.apache.lucene.search.Scorable
-
- org.apache.lucene.search.Scorer
-
- org.apache.lucene.search.CoveringScorer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.search.Scorable
Scorable.ChildScorable
-
-
Field Summary
Fields Modifier and Type Field Description private DocIdSetIterator
approximation
(package private) long
cost
(package private) int
doc
(package private) int
freq
(package private) boolean
matches
(package private) int
maxDoc
(package private) long
minMatch
(package private) LongValues
minMatchValues
(package private) int
numScorers
(package private) DisiPriorityQueue
subScorers
(package private) DisiWrapper
topList
private TwoPhaseIterator
twoPhase
-
Constructor Summary
Constructors Constructor Description CoveringScorer(Weight weight, java.util.Collection<Scorer> scorers, LongValues minMatchValues, int maxDoc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
advanceAll(int target)
int
docID()
Returns the doc ID that is currently being scored.java.util.Collection<Scorable.ChildScorable>
getChildren()
Returns child sub-scorers positioned on the current documentfloat
getMaxScore(int upTo)
Return the maximum score that documents between the lasttarget
that this iterator wasshallow-advanced
to included andupTo
included.DocIdSetIterator
iterator()
Return aDocIdSetIterator
over matching documents.float
score()
Returns the score of the current document matching the query.private void
setTopListAndFreq()
private void
setTopListAndFreqIfNecessary()
TwoPhaseIterator
twoPhaseIterator()
Optional method: Return aTwoPhaseIterator
view of thisScorer
.-
Methods inherited from class org.apache.lucene.search.Scorer
advanceShallow, getWeight
-
Methods inherited from class org.apache.lucene.search.Scorable
setMinCompetitiveScore
-
-
-
-
Field Detail
-
numScorers
final int numScorers
-
maxDoc
final int maxDoc
-
minMatchValues
final LongValues minMatchValues
-
matches
boolean matches
-
doc
int doc
-
topList
DisiWrapper topList
-
freq
int freq
-
minMatch
long minMatch
-
subScorers
final DisiPriorityQueue subScorers
-
cost
final long cost
-
approximation
private final DocIdSetIterator approximation
-
twoPhase
private final TwoPhaseIterator twoPhase
-
-
Constructor Detail
-
CoveringScorer
CoveringScorer(Weight weight, java.util.Collection<Scorer> scorers, LongValues minMatchValues, int maxDoc)
-
-
Method Detail
-
getChildren
public final java.util.Collection<Scorable.ChildScorable> getChildren() throws java.io.IOException
Description copied from class:Scorable
Returns child sub-scorers positioned on the current document- Overrides:
getChildren
in classScorable
- Throws:
java.io.IOException
-
iterator
public DocIdSetIterator iterator()
Description copied from class:Scorer
Return aDocIdSetIterator
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.
-
twoPhaseIterator
public TwoPhaseIterator twoPhaseIterator()
Description copied from class:Scorer
Optional method: Return aTwoPhaseIterator
view of thisScorer
. A return value ofnull
indicates that two-phase iteration is not supported. Note that the returnedTwoPhaseIterator
'sapproximation
must advance synchronously with theScorer.iterator()
: advancing the approximation must advance the iterator and vice-versa. Implementing this method is typically useful onScorer
s that have a high per-document overhead in order to confirm matches. The default implementation returnsnull
.- Overrides:
twoPhaseIterator
in classScorer
-
advanceAll
private void advanceAll(int target) throws java.io.IOException
- Throws:
java.io.IOException
-
setTopListAndFreq
private void setTopListAndFreq()
-
setTopListAndFreqIfNecessary
private void setTopListAndFreqIfNecessary() throws java.io.IOException
- Throws:
java.io.IOException
-
score
public float score() throws java.io.IOException
Description copied from class:Scorable
Returns the score of the current document matching the query.
-
getMaxScore
public float getMaxScore(int upTo) throws java.io.IOException
Description copied from class:Scorer
Return the maximum score that documents between the lasttarget
that this iterator wasshallow-advanced
to included andupTo
included.- Specified by:
getMaxScore
in classScorer
- Throws:
java.io.IOException
-
-