Package org.apache.lucene.search
Class ConjunctionDISI.ConjunctionTwoPhaseIterator
- java.lang.Object
-
- org.apache.lucene.search.TwoPhaseIterator
-
- org.apache.lucene.search.ConjunctionDISI.ConjunctionTwoPhaseIterator
-
- Enclosing class:
- ConjunctionDISI
private static final class ConjunctionDISI.ConjunctionTwoPhaseIterator extends TwoPhaseIterator
TwoPhaseIterator
implementing a conjunction.
-
-
Field Summary
Fields Modifier and Type Field Description private float
matchCost
private TwoPhaseIterator[]
twoPhaseIterators
-
Fields inherited from class org.apache.lucene.search.TwoPhaseIterator
approximation
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ConjunctionTwoPhaseIterator(DocIdSetIterator approximation, java.util.List<? extends TwoPhaseIterator> twoPhaseIterators)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
matchCost()
An estimate of the expected cost to determine that a single documentTwoPhaseIterator.matches()
.boolean
matches()
Return whether the current doc ID thatTwoPhaseIterator.approximation()
is on matches.-
Methods inherited from class org.apache.lucene.search.TwoPhaseIterator
approximation, asDocIdSetIterator, unwrap
-
-
-
-
Field Detail
-
twoPhaseIterators
private final TwoPhaseIterator[] twoPhaseIterators
-
matchCost
private final float matchCost
-
-
Constructor Detail
-
ConjunctionTwoPhaseIterator
private ConjunctionTwoPhaseIterator(DocIdSetIterator approximation, java.util.List<? extends TwoPhaseIterator> twoPhaseIterators)
-
-
Method Detail
-
matches
public boolean matches() throws java.io.IOException
Description copied from class:TwoPhaseIterator
Return whether the current doc ID thatTwoPhaseIterator.approximation()
is on matches. This method should only be called when the iterator is positioned -- ie. not whenDocIdSetIterator.docID()
is-1
orDocIdSetIterator.NO_MORE_DOCS
-- and at most once.- Specified by:
matches
in classTwoPhaseIterator
- Throws:
java.io.IOException
-
matchCost
public float matchCost()
Description copied from class:TwoPhaseIterator
An estimate of the expected cost to determine that a single documentTwoPhaseIterator.matches()
. This can be called before iterating the documents ofTwoPhaseIterator.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.- Specified by:
matchCost
in classTwoPhaseIterator
-
-