public class OffsetsEnum extends java.lang.Object implements java.lang.Comparable<OffsetsEnum>, java.io.Closeable
BytesRef), PostingsEnum, offset iteration tracking.
It is advanced with the underlying postings and is placed in a priority queue by
FieldHighlighter.highlightOffsetsEnums(List) based on the start offset.| Modifier and Type | Field and Description |
|---|---|
private int |
posCounter |
private PostingsEnum |
postingsEnum |
private BytesRef |
term |
private float |
weight |
| Constructor and Description |
|---|
OffsetsEnum(BytesRef term,
PostingsEnum postingsEnum) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
compareTo(OffsetsEnum other) |
int |
endOffset() |
int |
freq() |
PostingsEnum |
getPostingsEnum() |
BytesRef |
getTerm()
The term at this position; usually always the same.
|
float |
getWeight() |
boolean |
hasMorePositions() |
void |
nextPosition() |
void |
setWeight(float weight) |
int |
startOffset() |
private final BytesRef term
private final PostingsEnum postingsEnum
private float weight
private int posCounter
public OffsetsEnum(BytesRef term, PostingsEnum postingsEnum) throws java.io.IOException
java.io.IOExceptionpublic int compareTo(OffsetsEnum other)
compareTo in interface java.lang.Comparable<OffsetsEnum>public BytesRef getTerm() throws java.io.IOException
java.io.IOExceptionpublic PostingsEnum getPostingsEnum()
public int freq()
throws java.io.IOException
java.io.IOExceptionpublic boolean hasMorePositions()
throws java.io.IOException
java.io.IOExceptionpublic void nextPosition()
throws java.io.IOException
java.io.IOExceptionpublic int startOffset()
throws java.io.IOException
java.io.IOExceptionpublic int endOffset()
throws java.io.IOException
java.io.IOExceptionpublic float getWeight()
public void setWeight(float weight)
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException