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.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 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
Copyright © 2000–2018 The Apache Software Foundation. All rights reserved.