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.IOException
public int compareTo(OffsetsEnum other)
compareTo
in interface java.lang.Comparable<OffsetsEnum>
public BytesRef getTerm() throws java.io.IOException
java.io.IOException
public PostingsEnum getPostingsEnum()
public int freq() throws java.io.IOException
java.io.IOException
public boolean hasMorePositions() throws java.io.IOException
java.io.IOException
public void nextPosition() throws java.io.IOException
java.io.IOException
public int startOffset() throws java.io.IOException
java.io.IOException
public int endOffset() throws java.io.IOException
java.io.IOException
public float getWeight()
public void setWeight(float weight)
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException