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
CombinesPostingsEnumfor 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 classSTMergingTermsEnum.MultiSegmentsPostingsEnumCombines multiple segmentsPostingsEnumas 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 StringfieldNameprotected STMergingTermsEnum.MultiSegmentsPostingsEnummultiPostingsEnumprotected BytesRefterm
-
Constructor Summary
Constructors Modifier Constructor Description protectedSTMergingTermsEnum(String fieldName, int numSegments)Constructs aSTMergingTermsEnumfor a given field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeSourceattributes()intdocFreq()ImpactsEnumimpacts(int flags)BytesRefnext()longord()PostingsEnumpostings(PostingsEnum reuse, int flags)protected voidreset(BytesRef term, List<org.apache.lucene.codecs.uniformsplit.sharedterms.STUniformSplitTermsWriter.SegmentPostings> segmentPostings)Resets thisSTMergingTermsEnumwith a new term and its list ofSTUniformSplitTermsWriter.SegmentPostingsto combine.TermsEnum.SeekStatusseekCeil(BytesRef text)voidseekExact(long ord)booleanseekExact(BytesRef text)voidseekExact(BytesRef term, TermState state)BytesRefterm()TermStatetermState()longtotalTermFreq()
-
-
-
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 aSTMergingTermsEnumfor a given field.
-
-
Method Detail
-
reset
protected void reset(BytesRef term, List<org.apache.lucene.codecs.uniformsplit.sharedterms.STUniformSplitTermsWriter.SegmentPostings> segmentPostings)
Resets thisSTMergingTermsEnumwith a new term and its list ofSTUniformSplitTermsWriter.SegmentPostingsto combine.- Parameters:
segmentPostings- List sorted by segment index.
-
attributes
public AttributeSource attributes()
- Specified by:
attributesin classTermsEnum
-
seekExact
public boolean seekExact(BytesRef text) throws IOException
- Specified by:
seekExactin classTermsEnum- Throws:
IOException
-
seekCeil
public TermsEnum.SeekStatus seekCeil(BytesRef text)
-
seekExact
public void seekExact(BytesRef term, TermState state) throws IOException
- Specified by:
seekExactin classTermsEnum- Throws:
IOException
-
totalTermFreq
public long totalTermFreq()
- Specified by:
totalTermFreqin classTermsEnum
-
postings
public PostingsEnum postings(PostingsEnum reuse, int flags)
-
impacts
public ImpactsEnum impacts(int flags)
-
next
public BytesRef next()
-
-