private static class ToParentBlockJoinQuery.ParentTwoPhase extends TwoPhaseIterator
Modifier and Type | Field and Description |
---|---|
private DocIdSetIterator |
childApproximation |
private TwoPhaseIterator |
childTwoPhase |
private ToParentBlockJoinQuery.ParentApproximation |
parentApproximation |
approximation
Constructor and Description |
---|
ParentTwoPhase(ToParentBlockJoinQuery.ParentApproximation parentApproximation,
TwoPhaseIterator childTwoPhase) |
Modifier and Type | Method and Description |
---|---|
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 ToParentBlockJoinQuery.ParentApproximation parentApproximation
private final DocIdSetIterator childApproximation
private final TwoPhaseIterator childTwoPhase
ParentTwoPhase(ToParentBlockJoinQuery.ParentApproximation parentApproximation, TwoPhaseIterator childTwoPhase)
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