java.lang.Object
org.apache.lucene.search.TwoPhaseIterator
org.apache.lucene.search.DocValuesRangeIterator
Wrapper around a
TwoPhaseIterator
for a doc-values range query that speeds things up by
taking advantage of a DocValuesSkipper
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
(package private) static enum
private static final class
private static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DocValuesRangeIterator.Approximation
private final TwoPhaseIterator
-
Constructor Summary
ConstructorsConstructorDescriptionDocValuesRangeIterator
(TwoPhaseIterator twoPhase, DocValuesSkipper skipper, long lowerValue, long upperValue, boolean queryRangeHasGaps) -
Method Summary
Modifier and TypeMethodDescriptionfloat
An estimate of the expected cost to determine that a single documentTwoPhaseIterator.matches()
.final 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 Details
-
approximation
-
innerTwoPhase
-
-
Constructor Details
-
DocValuesRangeIterator
public DocValuesRangeIterator(TwoPhaseIterator twoPhase, DocValuesSkipper skipper, long lowerValue, long upperValue, boolean queryRangeHasGaps)
-
-
Method Details
-
matches
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:
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
-