Class MinimizingConjunctionMatchesIterator
- java.lang.Object
-
- org.apache.lucene.queries.intervals.MinimizingConjunctionMatchesIterator
-
- All Implemented Interfaces:
IntervalMatchesIterator,MatchesIterator
class MinimizingConjunctionMatchesIterator extends java.lang.Object implements IntervalMatchesIterator
-
-
Field Summary
Fields Modifier and Type Field Description private booleancached(package private) IntervalIteratoriteratorprivate java.util.List<CachingMatchesIterator>subs
-
Constructor Summary
Constructors Constructor Description MinimizingConjunctionMatchesIterator(IntervalIterator iterator, java.util.List<IntervalMatchesIterator> subs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intendOffset()The ending offset of the current match, or-1if offsets are not available Should only be called afterMatchesIterator.next()has returnedtrueintendPosition()The end position of the current match Should only be called afterMatchesIterator.next()has returnedtrueintgaps()The number of top-level gaps inside the current matchQuerygetQuery()Returns the Query causing the current match If thisMatchesIteratorhas been returned from aMatchesIterator.getSubMatches()call, then returns aTermQueryequivalent to the current match Should only be called afterMatchesIterator.next()has returnedtrueMatchesIteratorgetSubMatches()Returns a MatchesIterator that iterates over the positions and offsets of individual terms within the current match Returnsnullif there are no submatches (ie the current iterator is at the leaf level) Should only be called afterMatchesIterator.next()has returnedtruebooleannext()Advance the iterator to the next match positionintstartOffset()The starting offset of the current match, or-1if offsets are not available Should only be called afterMatchesIterator.next()has returnedtrueintstartPosition()The start position of the current match Should only be called afterMatchesIterator.next()has returnedtrueintwidth()The width of the current match
-
-
-
Field Detail
-
iterator
final IntervalIterator iterator
-
subs
private final java.util.List<CachingMatchesIterator> subs
-
cached
private boolean cached
-
-
Constructor Detail
-
MinimizingConjunctionMatchesIterator
MinimizingConjunctionMatchesIterator(IntervalIterator iterator, java.util.List<IntervalMatchesIterator> subs)
-
-
Method Detail
-
next
public boolean next() throws java.io.IOExceptionDescription copied from interface:MatchesIteratorAdvance the iterator to the next match position- Specified by:
nextin interfaceMatchesIterator- Returns:
trueif matches have not been exhausted- Throws:
java.io.IOException
-
startPosition
public int startPosition()
Description copied from interface:MatchesIteratorThe start position of the current match Should only be called afterMatchesIterator.next()has returnedtrue- Specified by:
startPositionin interfaceMatchesIterator
-
endPosition
public int endPosition()
Description copied from interface:MatchesIteratorThe end position of the current match Should only be called afterMatchesIterator.next()has returnedtrue- Specified by:
endPositionin interfaceMatchesIterator
-
startOffset
public int startOffset() throws java.io.IOExceptionDescription copied from interface:MatchesIteratorThe starting offset of the current match, or-1if offsets are not available Should only be called afterMatchesIterator.next()has returnedtrue- Specified by:
startOffsetin interfaceMatchesIterator- Throws:
java.io.IOException
-
endOffset
public int endOffset() throws java.io.IOExceptionDescription copied from interface:MatchesIteratorThe ending offset of the current match, or-1if offsets are not available Should only be called afterMatchesIterator.next()has returnedtrue- Specified by:
endOffsetin interfaceMatchesIterator- Throws:
java.io.IOException
-
gaps
public int gaps()
Description copied from interface:IntervalMatchesIteratorThe number of top-level gaps inside the current match- Specified by:
gapsin interfaceIntervalMatchesIterator- See Also:
IntervalIterator.gaps()
-
width
public int width()
Description copied from interface:IntervalMatchesIteratorThe width of the current match- Specified by:
widthin interfaceIntervalMatchesIterator- See Also:
IntervalIterator.width()
-
getSubMatches
public MatchesIterator getSubMatches() throws java.io.IOException
Description copied from interface:MatchesIteratorReturns a MatchesIterator that iterates over the positions and offsets of individual terms within the current match Returnsnullif there are no submatches (ie the current iterator is at the leaf level) Should only be called afterMatchesIterator.next()has returnedtrue- Specified by:
getSubMatchesin interfaceMatchesIterator- Throws:
java.io.IOException
-
getQuery
public Query getQuery()
Description copied from interface:MatchesIteratorReturns the Query causing the current match If thisMatchesIteratorhas been returned from aMatchesIterator.getSubMatches()call, then returns aTermQueryequivalent to the current match Should only be called afterMatchesIterator.next()has returnedtrue- Specified by:
getQueryin interfaceMatchesIterator
-
-