Class STMergingTermsEnum
- java.lang.Object
-
- org.apache.lucene.index.TermsEnum
-
- org.apache.lucene.codecs.uniformsplit.sharedterms.STMergingTermsEnum
-
- All Implemented Interfaces:
BytesRefIterator
public class STMergingTermsEnum extends TermsEnum
CombinesPostingsEnum
for the same term for a given field from multiple segments. It is used during segment merging.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
STMergingTermsEnum.MultiSegmentsPostingsEnum
Combines multiple segmentsPostingsEnum
as a singlePostingsEnum
, for one field and one term.-
Nested classes/interfaces inherited from class org.apache.lucene.index.TermsEnum
TermsEnum.SeekStatus
-
-
Field Summary
Fields Modifier and Type Field Description protected String
fieldName
protected STMergingTermsEnum.MultiSegmentsPostingsEnum
multiPostingsEnum
protected BytesRef
term
-
Constructor Summary
Constructors Modifier Constructor Description protected
STMergingTermsEnum(String fieldName, int numSegments)
Constructs aSTMergingTermsEnum
for a given field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeSource
attributes()
int
docFreq()
ImpactsEnum
impacts(int flags)
BytesRef
next()
long
ord()
PostingsEnum
postings(PostingsEnum reuse, int flags)
protected void
reset(BytesRef term, List<org.apache.lucene.codecs.uniformsplit.sharedterms.STUniformSplitTermsWriter.SegmentPostings> segmentPostings)
Resets thisSTMergingTermsEnum
with a new term and its list ofSTUniformSplitTermsWriter.SegmentPostings
to combine.TermsEnum.SeekStatus
seekCeil(BytesRef text)
void
seekExact(long ord)
boolean
seekExact(BytesRef text)
void
seekExact(BytesRef term, TermState state)
BytesRef
term()
TermState
termState()
long
totalTermFreq()
-
-
-
Field Detail
-
fieldName
protected final String fieldName
-
multiPostingsEnum
protected final STMergingTermsEnum.MultiSegmentsPostingsEnum multiPostingsEnum
-
term
protected BytesRef term
-
-
Constructor Detail
-
STMergingTermsEnum
protected STMergingTermsEnum(String fieldName, int numSegments)
Constructs aSTMergingTermsEnum
for a given field.
-
-
Method Detail
-
reset
protected void reset(BytesRef term, List<org.apache.lucene.codecs.uniformsplit.sharedterms.STUniformSplitTermsWriter.SegmentPostings> segmentPostings)
Resets thisSTMergingTermsEnum
with a new term and its list ofSTUniformSplitTermsWriter.SegmentPostings
to combine.- Parameters:
segmentPostings
- List sorted by segment index.
-
attributes
public AttributeSource attributes()
- Specified by:
attributes
in classTermsEnum
-
seekExact
public boolean seekExact(BytesRef text) throws IOException
- Specified by:
seekExact
in classTermsEnum
- Throws:
IOException
-
seekCeil
public TermsEnum.SeekStatus seekCeil(BytesRef text)
-
seekExact
public void seekExact(BytesRef term, TermState state) throws IOException
- Specified by:
seekExact
in classTermsEnum
- Throws:
IOException
-
totalTermFreq
public long totalTermFreq()
- Specified by:
totalTermFreq
in classTermsEnum
-
postings
public PostingsEnum postings(PostingsEnum reuse, int flags)
-
impacts
public ImpactsEnum impacts(int flags)
-
next
public BytesRef next()
-
-