Struct elasticlunr::inverted_index::InvertedIndex
source · pub struct InvertedIndex { /* private fields */ }
Expand description
Implements an elasticlunr.js inverted index. Most users do not need to use this type directly.
Implementations§
source§impl InvertedIndex
impl InvertedIndex
pub fn new() -> Self
pub fn add_token(&mut self, doc_ref: &str, token: &str, term_freq: f64)
pub fn has_token(&self, token: &str) -> bool
pub fn remove_token(&mut self, doc_ref: &str, token: &str)
pub fn get_docs(&self, token: &str) -> Option<BTreeMap<String, f64>>
pub fn get_term_frequency(&self, doc_ref: &str, token: &str) -> f64
pub fn get_doc_frequency(&self, token: &str) -> i64
Trait Implementations§
source§impl Debug for InvertedIndex
impl Debug for InvertedIndex
source§impl Default for InvertedIndex
impl Default for InvertedIndex
source§fn default() -> InvertedIndex
fn default() -> InvertedIndex
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for InvertedIndex
impl<'de> Deserialize<'de> for InvertedIndex
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
source§impl PartialEq<InvertedIndex> for InvertedIndex
impl PartialEq<InvertedIndex> for InvertedIndex
source§fn eq(&self, other: &InvertedIndex) -> bool
fn eq(&self, other: &InvertedIndex) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.