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
IOException
public int compareTo(OffsetsEnum other)
compareTo
in interface Comparable<OffsetsEnum>
public BytesRef getTerm() throws IOException
IOException
public PostingsEnum getPostingsEnum()
public int freq() throws IOException
IOException
public boolean hasMorePositions() throws IOException
IOException
public void nextPosition() throws IOException
IOException
public int startOffset() throws IOException
IOException
public int endOffset() throws IOException
IOException
public float getWeight()
public void setWeight(float weight)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.