Class OffsetsEnum.MultiOffsetsEnum
- java.lang.Object
-
- org.apache.lucene.search.uhighlight.OffsetsEnum
-
- org.apache.lucene.search.uhighlight.OffsetsEnum.MultiOffsetsEnum
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Comparable<OffsetsEnum>
- Enclosing class:
- OffsetsEnum
public static class OffsetsEnum.MultiOffsetsEnum extends OffsetsEnum
A view over several OffsetsEnum instances, merging them in-place
-
-
Nested Class Summary
-
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>queueprivate booleanstarted-
Fields inherited from class org.apache.lucene.search.uhighlight.OffsetsEnum
EMPTY
-
-
Constructor Summary
Constructors Constructor Description MultiOffsetsEnum(java.util.List<OffsetsEnum> inner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intendOffset()intfreq()An estimate of the number of occurrences of this term/OffsetsEnum.BytesRefgetTerm()The term at this position.booleannextPosition()Advances to the next position and returns true, or if can't then returns false.intstartOffset()-
Methods inherited from class org.apache.lucene.search.uhighlight.OffsetsEnum
compareTo, toString
-
-
-
-
Field Detail
-
queue
private final java.util.PriorityQueue<OffsetsEnum> queue
-
started
private boolean started
-
-
Constructor Detail
-
MultiOffsetsEnum
public MultiOffsetsEnum(java.util.List<OffsetsEnum> inner) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
nextPosition
public boolean nextPosition() throws java.io.IOExceptionDescription copied from class:OffsetsEnumAdvances 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:
nextPositionin classOffsetsEnum- Throws:
java.io.IOException
-
getTerm
public BytesRef getTerm() throws java.io.IOException
Description copied from class:OffsetsEnumThe term at this position. This BytesRef is safe to continue to refer to, even after we move to the next position.- Specified by:
getTermin classOffsetsEnum- Throws:
java.io.IOException- See Also:
Passage.getMatchTerms()
-
startOffset
public int startOffset() throws java.io.IOException- Specified by:
startOffsetin classOffsetsEnum- Throws:
java.io.IOException
-
endOffset
public int endOffset() throws java.io.IOException- Specified by:
endOffsetin classOffsetsEnum- Throws:
java.io.IOException
-
freq
public int freq() throws java.io.IOExceptionDescription copied from class:OffsetsEnumAn estimate of the number of occurrences of this term/OffsetsEnum.- Specified by:
freqin classOffsetsEnum- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classOffsetsEnum- Throws:
java.io.IOException
-
-