Class DocsAndPositionsEnum

    • Constructor Detail

      • DocsAndPositionsEnum

        protected DocsAndPositionsEnum()
        Sole constructor. (For invocation by subclass constructors, typically implicit.)
    • Method Detail

      • nextPosition

        public abstract int nextPosition()
                                  throws 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:
        IOException
      • startOffset

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

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

        public abstract BytesRef getPayload()
                                     throws 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:
        IOException