Class TokenStreamOffsetStrategy.TokenStreamOffsetsEnum

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Comparable<OffsetsEnum>
    Enclosing class:
    TokenStreamOffsetStrategy

    private static class TokenStreamOffsetStrategy.TokenStreamOffsetsEnum
    extends OffsetsEnum
    • Constructor Detail

      • TokenStreamOffsetsEnum

        TokenStreamOffsetsEnum​(TokenStream ts,
                               CharArrayMatcher[] matchers)
                        throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • nextPosition

        public boolean nextPosition()
                             throws java.io.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:
        java.io.IOException
      • freq

        public int freq()
                 throws java.io.IOException
        Description copied from class: OffsetsEnum
        An estimate of the number of occurrences of this term/OffsetsEnum.
        Specified by:
        freq in class OffsetsEnum
        Throws:
        java.io.IOException
      • startOffset

        public int startOffset()
                        throws java.io.IOException
        Specified by:
        startOffset in class OffsetsEnum
        Throws:
        java.io.IOException
      • endOffset

        public int endOffset()
                      throws java.io.IOException
        Specified by:
        endOffset in class OffsetsEnum
        Throws:
        java.io.IOException
      • getTerm

        public BytesRef getTerm()
                         throws java.io.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:
        java.io.IOException
        See Also:
        Passage.getMatchTerms()
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class OffsetsEnum
        Throws:
        java.io.IOException