private static class UnorderedIntervalsSource.UnorderedIntervalIterator extends ConjunctionIntervalIterator
Modifier and Type | Field and Description |
---|---|
private boolean |
allowOverlaps |
(package private) int |
end |
(package private) int |
firstEnd |
private int[] |
innerPositions |
private PriorityQueue<IntervalIterator> |
queue |
(package private) int |
queueEnd |
(package private) int |
start |
private IntervalIterator[] |
subIterators |
approximation, cost
NO_MORE_INTERVALS
NO_MORE_DOCS
Constructor and Description |
---|
UnorderedIntervalIterator(java.util.List<IntervalIterator> subIterators,
boolean allowOverlaps) |
Modifier and Type | Method and Description |
---|---|
int |
end()
The end of the current interval
Returns -1 if
IntervalIterator.nextInterval() has not yet been called and IntervalIterator.NO_MORE_INTERVALS
once the iterator is exhausted. |
int |
gaps()
The number of gaps within the current interval
Note that this returns the number of gaps between the immediate sub-intervals
of this interval, and does not include the gaps inside those sub-intervals.
|
private boolean |
hasOverlaps(IntervalIterator candidate) |
int |
nextInterval()
Advance the iterator to the next interval
|
protected void |
reset() |
int |
start()
The start of the current interval
Returns -1 if
IntervalIterator.nextInterval() has not yet been called and IntervalIterator.NO_MORE_INTERVALS
once the iterator is exhausted. |
(package private) void |
updateRightExtreme(IntervalIterator it) |
advance, cost, docID, matchCost, nextDoc
toString
all, empty, range, slowAdvance
private final PriorityQueue<IntervalIterator> queue
private final IntervalIterator[] subIterators
private final int[] innerPositions
private final boolean allowOverlaps
int start
int end
int firstEnd
int queueEnd
UnorderedIntervalIterator(java.util.List<IntervalIterator> subIterators, boolean allowOverlaps)
public int start()
IntervalIterator
IntervalIterator.nextInterval()
has not yet been called and IntervalIterator.NO_MORE_INTERVALS
once the iterator is exhausted.start
in class IntervalIterator
public int end()
IntervalIterator
IntervalIterator.nextInterval()
has not yet been called and IntervalIterator.NO_MORE_INTERVALS
once the iterator is exhausted.end
in class IntervalIterator
void updateRightExtreme(IntervalIterator it)
public int nextInterval() throws java.io.IOException
IntervalIterator
nextInterval
in class IntervalIterator
IntervalIterator.NO_MORE_INTERVALS
if
there are no more intervals on the current documentjava.io.IOException
public int gaps()
IntervalIterator
IntervalIterator.nextInterval()
, or after it has returned
IntervalIterator.NO_MORE_INTERVALS
gaps
in class IntervalIterator
protected void reset() throws java.io.IOException
reset
in class ConjunctionIntervalIterator
java.io.IOException
private boolean hasOverlaps(IntervalIterator candidate)