Class PostingsWriterBase
Extension of PostingsConsumer to support pluggable term dictionaries.
This class contains additional hooks to interact with the provided term dictionaries such as BlockTreeTermsWriter. If you want to re-use an existing implementation and are only interested in customizing the format of the postings list, extend this class instead.
@lucene.experimental
Inherited Members
Assembly: DistributedLucene.Net.dll
Syntax
public abstract class PostingsWriterBase : PostingsConsumer, IDisposable
Constructors
Name | Description |
---|---|
PostingsWriterBase() | Sole constructor. (For invocation by subclass constructors, typically implicit.) |
Methods
Name | Description |
---|---|
Dispose() | Disposes all resources used by this object. |
Dispose(Boolean) | Implementations must override and should dispose all resources used by this instance. |
EncodeTerm(Int64[], DataOutput, FieldInfo, BlockTermState, Boolean) | Encode metadata as long[] and byte[]. NOTE: sometimes long[] might contain "don't care" values that are unused, e.g. the pointer to postings list may not be defined for some terms but is defined for others, if it is designed to inline some postings data in term dictionary. In this case, the postings writer should always use the last value, so that each element in metadata long[] remains monotonic. |
FinishTerm(BlockTermState) | Finishes the current term. The provided BlockTermState contains the term's summary statistics, and will holds metadata from PBF when returned. |
Init(IndexOutput) | Called once after startup, before any terms have been
added. Implementations typically write a header to
the provided |
NewTermState() | Return a newly created empty TermState |
SetField(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. |
StartTerm() | Start a new term. Note that a matching call to FinishTerm(BlockTermState) is done, only if the term has at least one document. |