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 for InvertedIndex
impl PartialEq for InvertedIndex
Source§impl Serialize for InvertedIndex
impl Serialize for InvertedIndex
impl StructuralPartialEq for InvertedIndex
Auto Trait Implementations§
impl Freeze for InvertedIndex
impl RefUnwindSafe for InvertedIndex
impl Send for InvertedIndex
impl Sync for InvertedIndex
impl Unpin for InvertedIndex
impl UnwindSafe for InvertedIndex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more