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]

[src]

[src]

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

[src]

Add a document field to the Index.

[src]

Add the document fields to the Index.

[src]

Set the key used to store the document reference field.

[src]

Set the pipeline used by the Index.

[src]

Build an Index from this builder.

Trait Implementations

Auto Trait Implementations

impl Send for IndexBuilder

impl Sync for IndexBuilder