Class OffsetsEnum.OfMatchesIteratorWithSubs
- java.lang.Object
-
- org.apache.lucene.search.uhighlight.OffsetsEnum
-
- org.apache.lucene.search.uhighlight.OffsetsEnum.OfMatchesIteratorWithSubs
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Comparable<OffsetsEnum>
- Enclosing class:
- OffsetsEnum
public static class OffsetsEnum.OfMatchesIteratorWithSubs extends OffsetsEnum
Based on aMatchesIterator
with submatches.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
OffsetsEnum.OfMatchesIteratorWithSubs.CachedOE
-
Nested classes/interfaces inherited from class org.apache.lucene.search.uhighlight.OffsetsEnum
OffsetsEnum.MultiOffsetsEnum, OffsetsEnum.OfMatchesIterator, OffsetsEnum.OfMatchesIteratorWithSubs, OffsetsEnum.OfPostings
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.PriorityQueue<OffsetsEnum>
pendingQueue
private java.util.HashMap<Query,BytesRef>
queryToTermMap
-
Fields inherited from class org.apache.lucene.search.uhighlight.OffsetsEnum
EMPTY
-
-
Constructor Summary
Constructors Constructor Description OfMatchesIteratorWithSubs(MatchesIterator matchesIterator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
endOffset()
private boolean
enqueueCachedMatches(MatchesIterator thisMI)
int
freq()
An estimate of the number of occurrences of this term/OffsetsEnum.BytesRef
getTerm()
The term at this position.boolean
nextPosition()
Advances to the next position and returns true, or if can't then returns false.private void
nextWhenMatchesIterator(OffsetsEnum.OfMatchesIterator miOE)
private BytesRef
queryToTerm(Query query)
Maps a Query fromMatchesIterator.getQuery()
toOffsetsEnum.getTerm()
.int
startOffset()
-
Methods inherited from class org.apache.lucene.search.uhighlight.OffsetsEnum
close, compareTo, toString
-
-
-
-
Field Detail
-
pendingQueue
private final java.util.PriorityQueue<OffsetsEnum> pendingQueue
-
-
Constructor Detail
-
OfMatchesIteratorWithSubs
public OfMatchesIteratorWithSubs(MatchesIterator matchesIterator)
-
-
Method Detail
-
nextPosition
public boolean nextPosition() throws java.io.IOException
Description copied from class:OffsetsEnum
Advances to the next position and returns true, or if can't then returns false. Note that the initial state of this class is not positioned.- Specified by:
nextPosition
in classOffsetsEnum
- Throws:
java.io.IOException
-
nextWhenMatchesIterator
private void nextWhenMatchesIterator(OffsetsEnum.OfMatchesIterator miOE) throws java.io.IOException
- Throws:
java.io.IOException
-
enqueueCachedMatches
private boolean enqueueCachedMatches(MatchesIterator thisMI) throws java.io.IOException
- Throws:
java.io.IOException
-
freq
public int freq() throws java.io.IOException
Description copied from class:OffsetsEnum
An estimate of the number of occurrences of this term/OffsetsEnum.- Specified by:
freq
in classOffsetsEnum
- Throws:
java.io.IOException
-
getTerm
public BytesRef getTerm() throws java.io.IOException
Description copied from class:OffsetsEnum
The term at this position. This BytesRef is safe to continue to refer to, even after we move to the next position.- Specified by:
getTerm
in classOffsetsEnum
- Throws:
java.io.IOException
- See Also:
Passage.getMatchTerms()
-
startOffset
public int startOffset() throws java.io.IOException
- Specified by:
startOffset
in classOffsetsEnum
- Throws:
java.io.IOException
-
endOffset
public int endOffset() throws java.io.IOException
- Specified by:
endOffset
in classOffsetsEnum
- Throws:
java.io.IOException
-
-