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 boolean
cached
(package private) IntervalIterator
iterator
private java.util.List<CachingMatchesIterator>
subs
-
Constructor Summary
Constructors Constructor Description MinimizingConjunctionMatchesIterator(IntervalIterator iterator, java.util.List<MatchesIterator> subs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
endOffset()
The ending offset of the current match, or-1
if offsets are not available Should only be called afterMatchesIterator.next()
has returnedtrue
int
endPosition()
The end position of the current match Should only be called afterMatchesIterator.next()
has returnedtrue
int
gaps()
The number of top-level gaps inside the current matchQuery
getQuery()
Returns the Query causing the current match If thisMatchesIterator
has been returned from aMatchesIterator.getSubMatches()
call, then returns aTermQuery
equivalent to the current match Should only be called afterMatchesIterator.next()
has returnedtrue
MatchesIterator
getSubMatches()
Returns a MatchesIterator that iterates over the positions and offsets of individual terms within the current match Returnsnull
if there are no submatches (ie the current iterator is at the leaf level) Should only be called afterMatchesIterator.next()
has returnedtrue
boolean
next()
Advance the iterator to the next match positionint
startOffset()
The starting offset of the current match, or-1
if offsets are not available Should only be called afterMatchesIterator.next()
has returnedtrue
int
startPosition()
The start position of the current match Should only be called afterMatchesIterator.next()
has returnedtrue
-
-
-
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<MatchesIterator> subs)
-
-
Method Detail
-
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
- Returns:
true
if matches have not been exhausted- Throws:
java.io.IOException
-
startPosition
public int startPosition()
Description copied from interface:MatchesIterator
The start position of the current match Should only be called afterMatchesIterator.next()
has returnedtrue
- Specified by:
startPosition
in interfaceMatchesIterator
-
endPosition
public int endPosition()
Description copied from interface:MatchesIterator
The end position of the current match Should only be called afterMatchesIterator.next()
has returnedtrue
- Specified by:
endPosition
in interfaceMatchesIterator
-
startOffset
public int startOffset() throws java.io.IOException
Description copied from interface:MatchesIterator
The starting offset of the current match, or-1
if offsets are not available Should only be called afterMatchesIterator.next()
has returnedtrue
- Specified by:
startOffset
in interfaceMatchesIterator
- Throws:
java.io.IOException
-
endOffset
public int endOffset() throws java.io.IOException
Description copied from interface:MatchesIterator
The ending offset of the current match, or-1
if offsets are not available Should only be called afterMatchesIterator.next()
has returnedtrue
- Specified by:
endOffset
in interfaceMatchesIterator
- 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
-
getSubMatches
public MatchesIterator getSubMatches() throws java.io.IOException
Description copied from interface:MatchesIterator
Returns a MatchesIterator that iterates over the positions and offsets of individual terms within the current match Returnsnull
if there are no submatches (ie the current iterator is at the leaf level) Should only be called afterMatchesIterator.next()
has returnedtrue
- Specified by:
getSubMatches
in interfaceMatchesIterator
- Throws:
java.io.IOException
-
getQuery
public Query getQuery()
Description copied from interface:MatchesIterator
Returns the Query causing the current match If thisMatchesIterator
has been returned from aMatchesIterator.getSubMatches()
call, then returns aTermQuery
equivalent to the current match Should only be called afterMatchesIterator.next()
has returnedtrue
- Specified by:
getQuery
in interfaceMatchesIterator
-
-