Struct elasticlunr::Index [] [src]

pub struct Index { /* fields omitted */ }

An elasticlunr search index.

Methods

impl Index
[src]

[src]

Create a new index with the provided fields.

[src]

Add the data from a document to the index.

NOTE: The elements of data should be provided in the same order as the fields used to create the index.

Example

use elasticlunr::Index;
let mut index = Index::new(&["title", "body"]);
index.add_doc("1", &["this is a title", "this is body text"]);

[src]

[src]

Returns the index, serialized to pretty-printed JSON.

[src]

Returns the index, serialized to JSON.

Trait Implementations

impl Debug for Index
[src]

[src]

Formats the value using the given formatter.