Struct tantivy::postings::FieldSerializer [] [src]

pub struct FieldSerializer<'a> { /* fields omitted */ }

The field serializer is in charge of the serialization of a specific field.

Methods

impl<'a> FieldSerializer<'a>
[src]

[src]

Starts the postings for a new term.

  • term - the term. It needs to come after the previous term according to the lexicographical order.
  • doc_freq - return the number of document containing the term.

[src]

Serialize the information that a document contains the current term, its term frequency, and the position deltas.

At this point, the positions are already delta-encoded. For instance, if the positions are 2, 3, 17, position_deltas is 2, 1, 14

Term frequencies and positions may be ignored by the serializer depending on the configuration of the field in the Schema.

[src]

Finish the serialization for this term postings.

If the current block is incomplete, it need to be encoded using VInt encoding.

[src]

Closes the current current field.