Class CachingMatchesIterator
- java.lang.Object
-
- org.apache.lucene.search.FilterMatchesIterator
-
- org.apache.lucene.queries.intervals.CachingMatchesIterator
-
- All Implemented Interfaces:
IntervalMatchesIterator
,MatchesIterator
class CachingMatchesIterator extends FilterMatchesIterator implements IntervalMatchesIterator
-
-
Field Summary
Fields Modifier and Type Field Description private int
count
private Query[]
matchingQueries
private int[]
posAndOffsets
private boolean
positioned
-
Fields inherited from class org.apache.lucene.search.FilterMatchesIterator
in
-
-
Constructor Summary
Constructors Constructor Description CachingMatchesIterator(IntervalMatchesIterator in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
cache()
(package private) int
endOffset(int endPos)
int
gaps()
The number of top-level gaps inside the current match(package private) MatchesIterator
getSubMatches(int endPos)
boolean
next()
Advance the iterator to the next match position(package private) int
startOffset(int endPos)
int
width()
The width of the current match-
Methods inherited from class org.apache.lucene.search.FilterMatchesIterator
endOffset, endPosition, getQuery, getSubMatches, startOffset, startPosition
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.search.MatchesIterator
endOffset, endPosition, getQuery, getSubMatches, startOffset, startPosition
-
-
-
-
Field Detail
-
positioned
private boolean positioned
-
posAndOffsets
private int[] posAndOffsets
-
matchingQueries
private Query[] matchingQueries
-
count
private int count
-
-
Constructor Detail
-
CachingMatchesIterator
CachingMatchesIterator(IntervalMatchesIterator in)
-
-
Method Detail
-
cache
private void cache() throws java.io.IOException
- Throws:
java.io.IOException
-
next
public boolean next() throws java.io.IOException
Description copied from interface:MatchesIterator
Advance the iterator to the next match position- Specified by:
next
in interfaceMatchesIterator
- Overrides:
next
in classFilterMatchesIterator
- Returns:
true
if matches have not been exhausted- Throws:
java.io.IOException
-
startOffset
int startOffset(int endPos) throws java.io.IOException
- Throws:
java.io.IOException
-
endOffset
int endOffset(int endPos) throws java.io.IOException
- Throws:
java.io.IOException
-
getSubMatches
MatchesIterator getSubMatches(int endPos) throws java.io.IOException
- Throws:
java.io.IOException
-
gaps
public int gaps()
Description copied from interface:IntervalMatchesIterator
The number of top-level gaps inside the current match- Specified by:
gaps
in interfaceIntervalMatchesIterator
- See Also:
IntervalIterator.gaps()
-
width
public int width()
Description copied from interface:IntervalMatchesIterator
The width of the current match- Specified by:
width
in interfaceIntervalMatchesIterator
- See Also:
IntervalIterator.width()
-
-