public abstract class IntervalFilter extends IntervalIterator
IntervalIterator
and passes through those intervals that match the accept()
functionModifier and Type | Field and Description |
---|---|
protected IntervalIterator |
in |
NO_MORE_INTERVALS
NO_MORE_DOCS
Constructor and Description |
---|
IntervalFilter(IntervalIterator in)
Create a new filter
|
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
accept() |
int |
advance(int target) |
long |
cost() |
int |
docID() |
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.
|
float |
matchCost()
An indication of the average cost of iterating over all intervals in a document
|
int |
nextDoc() |
int |
nextInterval()
Advance the iterator to the next interval
|
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. |
toString, width
all, empty, range, slowAdvance
protected final IntervalIterator in
public IntervalFilter(IntervalIterator in)
public int docID()
docID
in class DocIdSetIterator
public int nextDoc() throws IOException
nextDoc
in class DocIdSetIterator
IOException
public int advance(int target) throws IOException
advance
in class DocIdSetIterator
IOException
public long cost()
cost
in class DocIdSetIterator
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
public int gaps()
IntervalIterator
IntervalIterator.nextInterval()
, or after it has returned
IntervalIterator.NO_MORE_INTERVALS
gaps
in class IntervalIterator
public float matchCost()
IntervalIterator
matchCost
in class IntervalIterator
TwoPhaseIterator.matchCost()
protected abstract boolean accept()
true
if the wrapped iterator's interval should be passed onpublic final int nextInterval() throws IOException
IntervalIterator
nextInterval
in class IntervalIterator
IntervalIterator.NO_MORE_INTERVALS
if
there are no more intervals on the current documentIOException
Copyright © 2000-2024 Apache Software Foundation. All Rights Reserved.