org.apache.lucene.codecs.uniformsplit.sharedterms

## 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 segments `PostingsEnum` as a single `PostingsEnum`, for one field and one term.

  This `PostingsEnum` does not extend `FilterLeafReader.FilterPostingsEnum` because it updates the delegate for each segment.

- - ### Field Summary

    Fields
    Modifier and Type | Field and 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 and Description
    --- | ---
    `protected` | `MultiSegmentsPostingsEnum(int numSegments)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 this `PostingsEnum`.
    `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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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

  - ### Constructor Detail

    - #### MultiSegmentsPostingsEnum

          protected MultiSegmentsPostingsEnum(int numSegments)

  - ### Method Detail

    - #### reset

          protected void reset(List<STUniformSplitTermsWriter.SegmentPostings> segmentPostingsList)

      Resets/reuse this `PostingsEnum`.
      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 class `PostingsEnum`
      Throws:
        `IOException`

    - #### nextPosition

          public int nextPosition()
                           throws IOException

      Specified by:
        `nextPosition` in class `PostingsEnum`
      Throws:
        `IOException`

    - #### startOffset

          public int startOffset()
                          throws IOException

      Specified by:
        `startOffset` in class `PostingsEnum`
      Throws:
        `IOException`

    - #### endOffset

          public int endOffset()
                        throws IOException

      Specified by:
        `endOffset` in class `PostingsEnum`
      Throws:
        `IOException`

    - #### getPayload

          public BytesRef getPayload()
                              throws IOException

      Specified by:
        `getPayload` in class `PostingsEnum`
      Throws:
        `IOException`

    - #### docID

          public int docID()

      Specified by:
        `docID` in class `DocIdSetIterator`

    - #### nextDoc

          public int nextDoc()
                      throws IOException

      Specified by:
        `nextDoc` in class `DocIdSetIterator`
      Throws:
        `IOException`

    - #### getPostings

          protected PostingsEnum getPostings(STUniformSplitTermsWriter.SegmentPostings segmentPostings)
                                      throws IOException

      Throws:
        `IOException`

    - #### advance

          public int advance(int target)

      Specified by:
        `advance` in class `DocIdSetIterator`

    - #### cost

          public long cost()

      Specified by:
        `cost` in class `DocIdSetIterator`

Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.