Method EncodeTerm
EncodeTerm(Int64[], DataOutput, FieldInfo, BlockTermState, Boolean)
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.
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.
Declaration
public abstract void EncodeTerm(long[] longs, DataOutput out, FieldInfo fieldInfo, BlockTermState state, bool absolute)
Parameters
Type | Name | Description |
---|---|---|
System.Int64[] | longs | |
DataOutput | out | |
FieldInfo | fieldInfo | |
BlockTermState | state | |
System.Boolean | absolute |