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.IOException
public abstract int freq() throws java.io.IOException
java.io.IOException
public abstract BytesRef getTerm() throws java.io.IOException
java.io.IOException
Passage.getMatchTerms()
public abstract int startOffset() throws java.io.IOException
java.io.IOException
public abstract int endOffset() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.