Class Lucene41PostingsWriter

All Implemented Interfaces:
Closeable, AutoCloseable

public final class Lucene41PostingsWriter extends PostingsWriterBase
Concrete class that writes docId(maybe frq,pos,offset,payloads) list with postings format. Postings list for each term will be stored separately.
See Also:
  • for details about skipping setting and postings layout.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a postings writer with PackedInts.COMPACT
    Lucene41PostingsWriter(SegmentWriteState state, float acceptableOverheadRatio)
    Creates a postings writer with the specified PackedInts overhead ratio
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addPosition(int position, BytesRef payload, int startOffset, int endOffset)
    Add a new position invalid input: '&' payload
    void
     
    void
    encodeTerm(long[] longs, DataOutput out, FieldInfo fieldInfo, BlockTermState _state, boolean absolute)
    Encode metadata as long[] and byte[].
    void
    Called when we are done adding positions invalid input: '&' payloads for each doc.
    void
    Called when we are done adding docs to this term
    void
    init(IndexOutput termsOut)
    Called once after startup, before any terms have been added.
    org.apache.lucene.codecs.lucene41.Lucene41PostingsWriter.IntBlockTermState
    Return a newly created empty TermState
    int
    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.
    void
    startDoc(int docID, int termDocFreq)
    Adds a new doc in this term.
    void
    Start a new term.

    Methods inherited from class org.apache.lucene.codecs.PostingsConsumer

    merge

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait