Trait tantivy::termdict::TermDictionaryBuilder [] [src]

pub trait TermDictionaryBuilder<W>: Sized where
    W: Write
{ fn new(write: W, field_type: FieldType) -> Result<Self>;
fn insert<K: AsRef<[u8]>>(&mut self, key: K, value: &TermInfo) -> Result<()>;
fn finish(self) -> Result<W>; }

Builder for the new term dictionary.

Inserting must be done in the order of the keys.

Required Methods

Creates a new TermDictionaryBuilder

Inserts a (key, value) pair in the term dictionary.

Keys have to be inserted in order.

Finalize writing the builder, and returns the underlying Write object.

Implementors