Struct elasticlunr::IndexBuilder[][src]

pub struct IndexBuilder { /* fields omitted */ }

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", "..."]);

Methods

impl IndexBuilder
[src]

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

impl Default for IndexBuilder
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations