Class DocsAndPositionsEnum

    • Method Detail

      • nextPosition

        public abstract int nextPosition()
                                  throws java.io.IOException
        Returns the next position. You should only call this up to DocsEnum.freq() times else the behavior is not defined. If positions were not indexed this will return -1; this only happens if offsets were indexed and you passed needsOffset=true when pulling the enum.
        Throws:
        java.io.IOException
      • startOffset

        public abstract int startOffset()
                                 throws java.io.IOException
        Returns start offset for the current position, or -1 if offsets were not indexed.
        Throws:
        java.io.IOException
      • endOffset

        public abstract int endOffset()
                               throws java.io.IOException
        Returns end offset for the current position, or -1 if offsets were not indexed.
        Throws:
        java.io.IOException
      • getPayload

        public abstract BytesRef getPayload()
                                     throws java.io.IOException
        Returns the payload at this position, or null if no payload was indexed. You should not modify anything (neither members of the returned BytesRef nor bytes in the byte[]).
        Throws:
        java.io.IOException