Class PhraseHelper.SpanCollectedOffsetsEnum
java.lang.Object
org.apache.lucene.search.uhighlight.OffsetsEnum
org.apache.lucene.search.uhighlight.PhraseHelper.SpanCollectedOffsetsEnum
- All Implemented Interfaces:
Closeable,AutoCloseable,Comparable<OffsetsEnum>
- Enclosing class:
PhraseHelper
-
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
FieldsModifier and TypeFieldDescriptionprivate final int[]private intprivate intprivate final int[]private final BytesRefFields inherited from class org.apache.lucene.search.uhighlight.OffsetsEnum
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidadd(int startOffset, int endOffset) intintfreq()An estimate of the number of occurrences of this term/OffsetsEnum.getTerm()The term at this position.booleanAdvances to the next position and returns true, or if can't then returns false.intMethods inherited from class org.apache.lucene.search.uhighlight.OffsetsEnum
close, compareTo, toString
-
Field Details
-
term
-
startOffsets
private final int[] startOffsets -
endOffsets
private final int[] endOffsets -
numPairs
private int numPairs -
enumIdx
private int enumIdx
-
-
Constructor Details
-
SpanCollectedOffsetsEnum
-
-
Method Details
-
add
void add(int startOffset, int endOffset) -
nextPosition
Description 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:
IOException
-
freq
Description copied from class:OffsetsEnumAn estimate of the number of occurrences of this term/OffsetsEnum.- Specified by:
freqin classOffsetsEnum- Throws:
IOException
-
getTerm
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:
IOException- See Also:
-
startOffset
- Specified by:
startOffsetin classOffsetsEnum- Throws:
IOException
-
endOffset
- Specified by:
endOffsetin classOffsetsEnum- Throws:
IOException
-