private static class ConjunctionDISI.TwoPhaseConjunctionDISI extends TwoPhaseIterator
TwoPhaseIterator view of a ConjunctionDISI.TwoPhase conjunction.| Modifier and Type | Field and Description |
|---|---|
private float |
matchCost |
private TwoPhaseIterator[] |
twoPhaseIterators |
approximation| Modifier | Constructor and Description |
|---|---|
private |
TwoPhaseConjunctionDISI(java.util.List<? extends DocIdSetIterator> iterators,
java.util.List<TwoPhaseIterator> twoPhaseIterators) |
| 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, asDocIdSetIteratorprivate final TwoPhaseIterator[] twoPhaseIterators
private final float matchCost
private TwoPhaseConjunctionDISI(java.util.List<? extends DocIdSetIterator> iterators, java.util.List<TwoPhaseIterator> twoPhaseIterators)
public boolean matches()
throws java.io.IOException
TwoPhaseIteratorTwoPhaseIterator.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 TwoPhaseIteratorjava.io.IOExceptionpublic float matchCost()
TwoPhaseIteratorTwoPhaseIterator.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