Package org.apache.lucene.search
Class FilterMatchesIterator
- java.lang.Object
-
- org.apache.lucene.search.FilterMatchesIterator
-
- All Implemented Interfaces:
MatchesIterator
public abstract class FilterMatchesIterator extends Object implements MatchesIterator
A MatchesIterator that delegates all calls to another MatchesIterator
-
-
Field Summary
Fields Modifier and Type Field Description protected MatchesIteratorinThe delegate
-
Constructor Summary
Constructors Modifier Constructor Description protectedFilterMatchesIterator(MatchesIterator in)Create a new FilterMatchesIterator
-
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 availableintendPosition()The end position of the current match, or-1if positions are not availableQuerygetQuery()Returns the Query causing the current matchMatchesIteratorgetSubMatches()Returns a MatchesIterator that iterates over the positions and offsets of individual terms within the current matchbooleannext()Advance the iterator to the next match positionintstartOffset()The starting offset of the current match, or-1if offsets are not availableintstartPosition()The start position of the current match, or-1if positions are not available
-
-
-
Field Detail
-
in
protected final MatchesIterator in
The delegate
-
-
Constructor Detail
-
FilterMatchesIterator
protected FilterMatchesIterator(MatchesIterator in)
Create a new FilterMatchesIterator- Parameters:
in- the delegate
-
-
Method Detail
-
next
public boolean next() throws IOExceptionDescription copied from interface:MatchesIteratorAdvance the iterator to the next match position- Specified by:
nextin interfaceMatchesIterator- Returns:
trueif matches have not been exhausted- Throws:
IOException
-
startPosition
public int startPosition()
Description copied from interface:MatchesIteratorThe start position of the current match, or-1if positions are not availableShould only be called after
MatchesIterator.next()has returnedtrue- Specified by:
startPositionin interfaceMatchesIterator
-
endPosition
public int endPosition()
Description copied from interface:MatchesIteratorThe end position of the current match, or-1if positions are not availableShould only be called after
MatchesIterator.next()has returnedtrue- Specified by:
endPositionin interfaceMatchesIterator
-
startOffset
public int startOffset() throws IOExceptionDescription copied from interface:MatchesIteratorThe starting offset of the current match, or-1if offsets are not availableShould only be called after
MatchesIterator.next()has returnedtrue- Specified by:
startOffsetin interfaceMatchesIterator- Throws:
IOException
-
endOffset
public int endOffset() throws IOExceptionDescription copied from interface:MatchesIteratorThe ending offset of the current match, or-1if offsets are not availableShould only be called after
MatchesIterator.next()has returnedtrue- Specified by:
endOffsetin interfaceMatchesIterator- Throws:
IOException
-
getSubMatches
public MatchesIterator getSubMatches() throws IOException
Description copied from interface:MatchesIteratorReturns a MatchesIterator that iterates over the positions and offsets of individual terms within the current matchReturns
nullif there are no submatches (ie the current iterator is at the leaf level)Should only be called after
MatchesIterator.next()has returnedtrue- Specified by:
getSubMatchesin interfaceMatchesIterator- Throws:
IOException
-
getQuery
public Query getQuery()
Description copied from interface:MatchesIteratorReturns the Query causing the current matchIf this
MatchesIteratorhas been returned from aMatchesIterator.getSubMatches()call, then returns aTermQueryequivalent to the current matchShould only be called after
MatchesIterator.next()has returnedtrue- Specified by:
getQueryin interfaceMatchesIterator
-
-