pub struct IndexBuilder { /* private fields */ }
Expand description

A builder for an Index with custom parameters.

Example

let mut index = IndexBuilder::new()
    .save_docs(false)
    .add_fields(&["title", "subtitle", "body"])
    .set_ref("doc_id")
    .build();
index.add_doc("doc_a", &["Chapter 1", "Welcome to Copenhagen", "..."]);

Implementations§

Set whether or not documents should be saved in the Index’s document store.

Add a document field to the Index.

If the Index already contains a field with an identical name, adding it again is a no-op.

Add the document fields to the Index.

If the Index already contains a field with an identical name, adding it again is a no-op.

Set the key used to store the document reference field.

Set the pipeline used by the Index.

Build an Index from this builder.

Trait Implementations§

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.