Class PushPostingsWriterBase

    • Field Detail

      • writeFreqs

        protected boolean writeFreqs
        True if the current field writes freqs.
      • writePositions

        protected boolean writePositions
        True if the current field writes positions.
      • writePayloads

        protected boolean writePayloads
        True if the current field writes payloads.
      • writeOffsets

        protected boolean writeOffsets
        True if the current field writes offsets.
    • Constructor Detail

      • PushPostingsWriterBase

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

      • finishTerm

        public abstract void finishTerm​(BlockTermState state)
                                 throws IOException
        Finishes the current term. The provided BlockTermState contains the term's summary statistics, and will holds metadata from PBF when returned
      • setField

        public void setField​(FieldInfo fieldInfo)
        Sets the current field for writing, and returns the fixed length of long[] metadata (which is fixed per field), called when the writing switches to another field.
        Specified by:
        setField in class PostingsWriterBase
      • startDoc

        public abstract void startDoc​(int docID,
                                      int freq)
                               throws IOException
        Adds a new doc in this term. freq will be -1 when term frequencies are omitted for the field.
      • addPosition

        public abstract void addPosition​(int position,
                                         BytesRef payload,
                                         int startOffset,
                                         int endOffset)
                                  throws IOException
        Add a new position and payload, and start/end offset. A null payload means no payload; a non-null payload with zero length also means no payload. Caller may reuse the BytesRef for the payload between calls (method must fully consume the payload). startOffset and endOffset will be -1 when offsets are not indexed.
      • finishDoc

        public abstract void finishDoc()
                                throws IOException
        Called when we are done adding positions and payloads for each doc.