public class OffsetsEnum extends Object implements Comparable<OffsetsEnum>, 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.| 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() |
public OffsetsEnum(BytesRef term, PostingsEnum postingsEnum) throws IOException
IOExceptionpublic int compareTo(OffsetsEnum other)
compareTo in interface Comparable<OffsetsEnum>public BytesRef getTerm() throws IOException
IOExceptionpublic PostingsEnum getPostingsEnum()
public int freq()
throws IOException
IOExceptionpublic boolean hasMorePositions()
throws IOException
IOExceptionpublic void nextPosition()
throws IOException
IOExceptionpublic int startOffset()
throws IOException
IOExceptionpublic int endOffset()
throws IOException
IOExceptionpublic float getWeight()
public void setWeight(float weight)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.