Module org.apache.lucene.core
Package org.apache.lucene.search
Class DisjunctionMatchesIterator.TermsEnumDisjunctionMatchesIterator
- java.lang.Object
-
- org.apache.lucene.search.DisjunctionMatchesIterator.TermsEnumDisjunctionMatchesIterator
-
- All Implemented Interfaces:
MatchesIterator
- Enclosing class:
- DisjunctionMatchesIterator
private static class DisjunctionMatchesIterator.TermsEnumDisjunctionMatchesIterator extends java.lang.Object implements MatchesIterator
-
-
Field Summary
Fields Modifier and Type Field Description private int
doc
private MatchesIterator
first
private MatchesIterator
it
private Query
query
private TermsEnum
te
private BytesRefIterator
terms
-
Constructor Summary
Constructors Constructor Description TermsEnumDisjunctionMatchesIterator(MatchesIterator first, BytesRefIterator terms, TermsEnum te, int doc, Query query)
-
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 availableint
endPosition()
The end position of the current matchQuery
getQuery()
Returns the Query causing the current matchMatchesIterator
getSubMatches()
Returns a MatchesIterator that iterates over the positions and offsets of individual terms within the current matchprivate void
init()
boolean
next()
Advance the iterator to the next match positionint
startOffset()
The starting offset of the current match, or-1
if offsets are not availableint
startPosition()
The start position of the current match
-
-
-
Field Detail
-
first
private final MatchesIterator first
-
terms
private final BytesRefIterator terms
-
te
private final TermsEnum te
-
doc
private final int doc
-
query
private final Query query
-
it
private MatchesIterator it
-
-
Constructor Detail
-
TermsEnumDisjunctionMatchesIterator
TermsEnumDisjunctionMatchesIterator(MatchesIterator first, BytesRefIterator terms, TermsEnum te, int doc, Query query)
-
-
Method Detail
-
init
private void init() 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
- 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 matchShould only be called after
MatchesIterator.next()
has returnedtrue
- Specified by:
startPosition
in interfaceMatchesIterator
-
endPosition
public int endPosition()
Description copied from interface:MatchesIterator
The end position of the current matchShould only be called after
MatchesIterator.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 availableShould only be called after
MatchesIterator.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 availableShould only be called after
MatchesIterator.next()
has returnedtrue
- Specified by:
endOffset
in interfaceMatchesIterator
- Throws:
java.io.IOException
-
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 matchReturns
null
if there are no submatches (ie the current iterator is at the leaf level)Should only be called after
MatchesIterator.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 matchIf this
MatchesIterator
has been returned from aMatchesIterator.getSubMatches()
call, then returns aTermQuery
equivalent to the current matchShould only be called after
MatchesIterator.next()
has returnedtrue
- Specified by:
getQuery
in interfaceMatchesIterator
-
-