org.apache.lucene.search.uhighlight

## Class OffsetsEnum.OfPostings

- java.lang.Object
- - org.apache.lucene.search.uhighlight.OffsetsEnum
  - - org.apache.lucene.search.uhighlight.OffsetsEnum.OfPostings

- All Implemented Interfaces:
    Closeable, AutoCloseable, Comparable<OffsetsEnum>
  Enclosing class:
    OffsetsEnum

      public static class OffsetsEnum.OfPostings
      extends OffsetsEnum

  Based on a `PostingsEnum` -- the typical/standard OE impl.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.lucene.search.uhighlight.OffsetsEnum

      `OffsetsEnum.MultiOffsetsEnum, OffsetsEnum.OfMatchesIterator, OffsetsEnum.OfMatchesIteratorWithSubs, OffsetsEnum.OfPostings`

  - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.search.uhighlight.OffsetsEnum

      `EMPTY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OfPostings(BytesRef term, int freq, PostingsEnum postingsEnum)`
    `OfPostings(BytesRef term, PostingsEnum postingsEnum)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `endOffset()`
    `int` | `freq()` An estimate of the number of occurrences of this term/OffsetsEnum.
    `PostingsEnum` | `getPostingsEnum()`
    `BytesRef` | `getTerm()` The term at this position.
    `boolean` | `nextPosition()` Advances to the next position and returns true, or if can't then returns false.
    `int` | `startOffset()`

    - ### Methods inherited from class org.apache.lucene.search.uhighlight.OffsetsEnum

      `close, compareTo, toString`

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

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

- - ### Constructor Detail

    - #### OfPostings

          public OfPostings(BytesRef term,
                            int freq,
                            PostingsEnum postingsEnum)
                     throws IOException

      Throws:
        `IOException`

    - #### OfPostings

          public OfPostings(BytesRef term,
                            PostingsEnum postingsEnum)
                     throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### getPostingsEnum

          public PostingsEnum getPostingsEnum()

    - #### nextPosition

          public boolean nextPosition()
                               throws IOException

      Description copied from class: `OffsetsEnum`
      Advances to the next position and returns true, or if can't then returns false. Note that the initial state of this class is not positioned.
      Specified by:
        `nextPosition` in class `OffsetsEnum`
      Throws:
        `IOException`

    - #### getTerm

          public BytesRef getTerm()
                           throws IOException

      Description copied from class: `OffsetsEnum`
      The term at this position. This BytesRef is safe to continue to refer to, even after we move to the next position.
      Specified by:
        `getTerm` in class `OffsetsEnum`
      Throws:
        `IOException`
      See Also:
        `Passage.getMatchTerms()`

    - #### startOffset

          public int startOffset()
                          throws IOException

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

    - #### endOffset

          public int endOffset()
                        throws IOException

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

    - #### freq

          public int freq()
                   throws IOException

      Description copied from class: `OffsetsEnum`
      An estimate of the number of occurrences of this term/OffsetsEnum.
      Specified by:
        `freq` in class `OffsetsEnum`
      Throws:
        `IOException`

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