Struct tantivy::fastfield::IntFastFieldWriter [] [src]

pub struct IntFastFieldWriter { /* fields omitted */ }

Fast field writer for ints. The fast field writer just keeps the values in memory.

Only when the segment writer can be closed and persisted on disc, the fast field writer is sent to a FastFieldSerializer via the .serialize(...) method.

We cannot serialize earlier as the values are bitpacked and the number of bits required for bitpacking can only been known once we have seen all of the values.

Both u64, and i64 use the same writer. i64 are just remapped to the 0..2^64 - 1 using common::i64_to_u64.

Methods

impl IntFastFieldWriter
[src]

[src]

Creates a new IntFastFieldWriter

[src]

Returns the field that this writer is targetting.

[src]

Records a new value.

The n-th value being recorded is implicitely associated to the document with the DocId n. (Well, n-1 actually because of 0-indexing)

[src]

Extract the fast field value from the document (or use the default value) and records it.

[src]

Push the fast fields value to the FastFieldWriter.