private class DisjunctionScorer.TwoPhase extends TwoPhaseIterator
Modifier and Type | Field and Description |
---|---|
private float |
matchCost |
(package private) PriorityQueue<DisiWrapper> |
unverifiedMatches |
(package private) DisiWrapper |
verifiedMatches |
approximation
Modifier | Constructor and Description |
---|---|
private |
TwoPhase(DocIdSetIterator approximation,
float matchCost) |
Modifier and Type | Method and Description |
---|---|
(package private) DisiWrapper |
getSubMatches() |
float |
matchCost()
An estimate of the expected cost to determine that a single document
TwoPhaseIterator.matches() . |
boolean |
matches()
Return whether the current doc ID that
TwoPhaseIterator.approximation() is on matches. |
approximation, asDocIdSetIterator, unwrap
private final float matchCost
DisiWrapper verifiedMatches
final PriorityQueue<DisiWrapper> unverifiedMatches
private TwoPhase(DocIdSetIterator approximation, float matchCost)
DisiWrapper getSubMatches() throws java.io.IOException
java.io.IOException
public boolean matches() throws java.io.IOException
TwoPhaseIterator
TwoPhaseIterator.approximation()
is on matches. This
method should only be called when the iterator is positioned -- ie. not
when DocIdSetIterator.docID()
is -1
or
DocIdSetIterator.NO_MORE_DOCS
-- and at most once.matches
in class TwoPhaseIterator
java.io.IOException
public float matchCost()
TwoPhaseIterator
TwoPhaseIterator.matches()
.
This can be called before iterating the documents of TwoPhaseIterator.approximation()
.
Returns an expected cost in number of simple operations like addition, multiplication,
comparing two numbers and indexing an array.
The returned value must be positive.matchCost
in class TwoPhaseIterator