org.apache.lucene.index

## Class RandomPostingsTester.SeedPostings

- java.lang.Object
- - org.apache.lucene.search.DocIdSetIterator
  - - org.apache.lucene.index.PostingsEnum
    - - org.apache.lucene.index.RandomPostingsTester.SeedPostings

- Enclosing class:
    RandomPostingsTester

      public static class RandomPostingsTester.SeedPostings
      extends PostingsEnum

  Given the same random seed this always enumerates the same random postings

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `docFreq`
    `int` | `upto`

    - ### 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
    Constructor and Description
    `SeedPostings(long seed, int minDocFreq, int maxDocFreq, IndexOptions options, boolean allowPayloads)`

  - ### 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()`
    `int` | `nextDoc()`
    `int` | `nextPosition()`
    `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

    - #### docFreq

          public int docFreq

    - #### upto

          public int upto

  - ### Constructor Detail

    - #### SeedPostings

          public SeedPostings(long seed,
                              int minDocFreq,
                              int maxDocFreq,
                              IndexOptions options,
                              boolean allowPayloads)

  - ### Method Detail

    - #### nextDoc

          public int nextDoc()

      Specified by:
        `nextDoc` in class `DocIdSetIterator`

    - #### docID

          public int docID()

      Specified by:
        `docID` in class `DocIdSetIterator`

    - #### freq

          public int freq()

      Specified by:
        `freq` in class `PostingsEnum`

    - #### nextPosition

          public int nextPosition()

      Specified by:
        `nextPosition` in class `PostingsEnum`

    - #### startOffset

          public int startOffset()

      Specified by:
        `startOffset` in class `PostingsEnum`

    - #### endOffset

          public int endOffset()

      Specified by:
        `endOffset` in class `PostingsEnum`

    - #### getPayload

          public BytesRef getPayload()

      Specified by:
        `getPayload` in class `PostingsEnum`

    - #### advance

          public int advance(int target)
                      throws IOException

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

    - #### cost

          public long cost()

      Specified by:
        `cost` in class `DocIdSetIterator`

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