private static final class ConjunctionDISI.ConjunctionTwoPhaseIterator extends TwoPhaseIterator
TwoPhaseIterator implementing a conjunction.| Modifier and Type | Field and Description |
|---|---|
private float |
matchCost |
private TwoPhaseIterator[] |
twoPhaseIterators |
approximation| Modifier | Constructor and Description |
|---|---|
private |
ConjunctionTwoPhaseIterator(DocIdSetIterator approximation,
java.util.List<? extends 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, asDocIdSetIterator, unwrapprivate final TwoPhaseIterator[] twoPhaseIterators
private final float matchCost
private ConjunctionTwoPhaseIterator(DocIdSetIterator approximation, java.util.List<? extends 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