public abstract class OffsetsEnum extends java.lang.Object implements java.lang.Comparable<OffsetsEnum>, java.io.Closeable
FieldHighlighter.
It is advanced and is placed in a priority queue by
FieldHighlighter.highlightOffsetsEnums(OffsetsEnum) based on the start offset.| Modifier and Type | Class and Description |
|---|---|
static class |
OffsetsEnum.MultiOffsetsEnum
A view over several OffsetsEnum instances, merging them in-place
|
static class |
OffsetsEnum.OfMatchesIterator
Based on a
MatchesIterator; does not look at submatches. |
static class |
OffsetsEnum.OfMatchesIteratorWithSubs
Based on a
MatchesIterator with submatches. |
static class |
OffsetsEnum.OfPostings
Based on a
PostingsEnum -- the typical/standard OE impl. |
| Modifier and Type | Field and Description |
|---|---|
static OffsetsEnum |
EMPTY
Empty enumeration
|
| Constructor and Description |
|---|
OffsetsEnum() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
compareTo(OffsetsEnum other) |
abstract int |
endOffset() |
abstract int |
freq()
An estimate of the number of occurrences of this term/OffsetsEnum.
|
abstract BytesRef |
getTerm()
The term at this position.
|
abstract boolean |
nextPosition()
Advances to the next position and returns true, or if can't then returns false.
|
abstract int |
startOffset() |
java.lang.String |
toString() |
public static final OffsetsEnum EMPTY
public int compareTo(OffsetsEnum other)
compareTo in interface java.lang.Comparable<OffsetsEnum>public abstract boolean nextPosition()
throws java.io.IOException
java.io.IOExceptionpublic abstract int freq()
throws java.io.IOException
java.io.IOExceptionpublic abstract BytesRef getTerm() throws java.io.IOException
java.io.IOExceptionPassage.getMatchTerms()public abstract int startOffset()
throws java.io.IOException
java.io.IOExceptionpublic abstract int endOffset()
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2000–2025 The Apache Software Foundation. All rights reserved.