Struct elasticlunr::document_store::DocumentStore
source · pub struct DocumentStore {
pub save: bool,
pub docs: BTreeMap<String, BTreeMap<String, String>>,
pub doc_info: BTreeMap<String, BTreeMap<String, usize>>,
pub length: usize,
}
Expand description
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
Implementations§
source§impl DocumentStore
impl DocumentStore
pub fn new(save: bool) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn is_stored(&self) -> bool
pub fn has_doc(&self, doc_ref: &str) -> bool
pub fn add_doc(&mut self, doc_ref: &str, doc: BTreeMap<String, String>)
pub fn get_doc(&self, doc_ref: &str) -> Option<BTreeMap<String, String>>
pub fn remove_doc(&mut self, doc_ref: &str)
pub fn add_field_length(&mut self, doc_ref: &str, field: &str, length: usize)
pub fn get_field_length(&self, doc_ref: &str, field: &str) -> usize
Trait Implementations§
source§impl Clone for DocumentStore
impl Clone for DocumentStore
source§fn clone(&self) -> DocumentStore
fn clone(&self) -> DocumentStore
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DocumentStore
impl Debug for DocumentStore
source§impl<'de> Deserialize<'de> for DocumentStore
impl<'de> Deserialize<'de> for DocumentStore
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more