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.

Panics

Panics if a field with the name already exists.

Add a document field to the Index, with a custom tokenizer for that field.

Panics

Panics if a field with the name already exists.

Add the document fields to the Index.

Panics

Panics if two fields have the same name.

Set the key used to store the document reference field.

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.