Lucene101PostingsWriter
Writer for Lucene101PostingsFormat.
Properties
Functions
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.
Encode metadata as long[] and byte[]. absolute controls whether current term is delta encoded according to latest term. Usually elements in longs are file pointers, so each one always increases when a new term is consumed. out is used to write generic bytes, which are not monotonic.
Called when we are done adding docs to this term
Called once after startup, before any terms have been added. Implementations typically write a header to the provided termsOut.
Return a newly created empty TermState
Start a new term. Note that a matching call to .finishTerm is done, only if the term has at least one document.
Write all postings for one term; use the provided TermsEnum to pull a [ ]. This method should not re-position the TermsEnum! It is already positioned on the term that should be written. This method must set the bit in the provided FixedBitSet for every docID written. If no docs were written, this method should return null, and the terms dict will skip the term.