Struct elasticlunr::document_store::DocumentStore
[−]
[src]
pub struct DocumentStore { pub save: bool, pub docs: BTreeMap<String, BTreeMap<String, String>>, pub doc_info: BTreeMap<String, BTreeMap<String, usize>>, pub length: usize, }
The document store saves the complete text of each item saved to the index, if enabled. Most users do not need to use this type directly.
Fields
save: bool
docs: BTreeMap<String, BTreeMap<String, String>>
doc_info: BTreeMap<String, BTreeMap<String, usize>>
length: usize
Methods
impl DocumentStore
[src]
pub fn new(save: bool) -> Self
[src]
pub fn len(&self) -> usize
[src]
pub fn is_stored(&self) -> bool
[src]
pub fn has_doc(&self, doc_ref: &str) -> bool
[src]
pub fn add_doc(&mut self, doc_ref: &str, doc: BTreeMap<String, String>)
[src]
pub fn get_doc(&self, doc_ref: &str) -> Option<BTreeMap<String, String>>
[src]
pub fn remove_doc(&mut self, doc_ref: &str)
[src]
pub fn add_field_length(&mut self, doc_ref: &str, field: &str, length: usize)
[src]
pub fn get_field_length(&self, doc_ref: &str, field: &str) -> usize
[src]
Trait Implementations
impl Debug for DocumentStore
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for DocumentStore
[src]
fn clone(&self) -> DocumentStore
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more