Class STMergingTermsEnum.MultiSegmentsPostingsEnum
- java.lang.Object
-
- org.apache.lucene.search.DocIdSetIterator
-
- org.apache.lucene.index.PostingsEnum
-
- org.apache.lucene.codecs.uniformsplit.sharedterms.STMergingTermsEnum.MultiSegmentsPostingsEnum
-
- Enclosing class:
- STMergingTermsEnum
protected class STMergingTermsEnum.MultiSegmentsPostingsEnum extends PostingsEnum
Combines multiple segmentsPostingsEnum
as a singlePostingsEnum
, for one field and one term.This
PostingsEnum
does not extendFilterLeafReader.FilterPostingsEnum
because it updates the delegate for each segment.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
docId
protected MergeState.DocMap
docMap
protected PostingsEnum
postingsEnum
protected boolean
postingsEnumExhausted
protected int
postingsFlags
protected PostingsEnum[]
reusablePostingsEnums
protected int
segmentIndex
protected List<STUniformSplitTermsWriter.SegmentPostings>
segmentPostingsList
-
Fields inherited from class org.apache.lucene.index.PostingsEnum
ALL, FREQS, NONE, OFFSETS, PAYLOADS, POSITIONS
-
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MultiSegmentsPostingsEnum(int numSegments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
advance(int target)
long
cost()
int
docID()
int
endOffset()
int
freq()
BytesRef
getPayload()
protected PostingsEnum
getPostings(STUniformSplitTermsWriter.SegmentPostings segmentPostings)
int
nextDoc()
int
nextPosition()
protected void
reset(List<STUniformSplitTermsWriter.SegmentPostings> segmentPostingsList)
Resets/reuse thisPostingsEnum
.protected void
setPostingFlags(int flags)
int
startOffset()
-
Methods inherited from class org.apache.lucene.index.PostingsEnum
featureRequested
-
Methods inherited from class org.apache.lucene.search.DocIdSetIterator
all, empty, range, slowAdvance
-
-
-
-
Field Detail
-
reusablePostingsEnums
protected final PostingsEnum[] reusablePostingsEnums
-
segmentPostingsList
protected List<STUniformSplitTermsWriter.SegmentPostings> segmentPostingsList
-
segmentIndex
protected int segmentIndex
-
postingsEnum
protected PostingsEnum postingsEnum
-
postingsEnumExhausted
protected boolean postingsEnumExhausted
-
docMap
protected MergeState.DocMap docMap
-
docId
protected int docId
-
postingsFlags
protected int postingsFlags
-
-
Method Detail
-
reset
protected void reset(List<STUniformSplitTermsWriter.SegmentPostings> segmentPostingsList)
Resets/reuse thisPostingsEnum
.- Parameters:
segmentPostingsList
- List of segment postings ordered by segment index.
-
setPostingFlags
protected void setPostingFlags(int flags)
-
freq
public int freq() throws IOException
- Specified by:
freq
in classPostingsEnum
- Throws:
IOException
-
nextPosition
public int nextPosition() throws IOException
- Specified by:
nextPosition
in classPostingsEnum
- Throws:
IOException
-
startOffset
public int startOffset() throws IOException
- Specified by:
startOffset
in classPostingsEnum
- Throws:
IOException
-
endOffset
public int endOffset() throws IOException
- Specified by:
endOffset
in classPostingsEnum
- Throws:
IOException
-
getPayload
public BytesRef getPayload() throws IOException
- Specified by:
getPayload
in classPostingsEnum
- Throws:
IOException
-
docID
public int docID()
- Specified by:
docID
in classDocIdSetIterator
-
nextDoc
public int nextDoc() throws IOException
- Specified by:
nextDoc
in classDocIdSetIterator
- Throws:
IOException
-
getPostings
protected PostingsEnum getPostings(STUniformSplitTermsWriter.SegmentPostings segmentPostings) throws IOException
- Throws:
IOException
-
advance
public int advance(int target)
- Specified by:
advance
in classDocIdSetIterator
-
cost
public long cost()
- Specified by:
cost
in classDocIdSetIterator
-
-