pub struct SimpleOccurences<'a> { /* private fields */ }
Implementations§
source§impl<'a> SimpleOccurences<'a>
impl<'a> SimpleOccurences<'a>
Once this is used, call Self::missing
and MissingOccurrences::apply
to remove the missing entries found during
the search.
§Panics
Using the OccurenceProvider::occurrences_of_word
may panic, if not all documents returned
from Provider::documents_with_word
. If a document doesn’t exist, still Self::add_document
,
but with an empty String
.
sourcepub fn new(index: &'a Simple, word_proximates: &'a ProximateMap<'a>) -> Self
pub fn new(index: &'a Simple, word_proximates: &'a ProximateMap<'a>) -> Self
The proximity::ProximateMap
can be acquired from
crate::query::Documents::take_proximate_map
which is returned from crate::Query::documents
.
pub fn add_document(&mut self, id: Id, content: Arc<String>)
sourcepub fn missing(&self) -> MissingOccurrences
pub fn missing(&self) -> MissingOccurrences
Remove the missing references.
Trait Implementations§
source§impl<'a> Debug for SimpleOccurences<'a>
impl<'a> Debug for SimpleOccurences<'a>
source§impl<'a> OccurenceProvider<'a> for SimpleOccurences<'a>
impl<'a> OccurenceProvider<'a> for SimpleOccurences<'a>
type Iter = SimpleOccurrencesIter<'a, Box<dyn Iterator<Item = (Id, &'a Alphanumeral<StrPtr>, f32)> + 'a>>
Auto Trait Implementations§
impl<'a> !Freeze for SimpleOccurences<'a>
impl<'a> RefUnwindSafe for SimpleOccurences<'a>
impl<'a> Send for SimpleOccurences<'a>
impl<'a> Sync for SimpleOccurences<'a>
impl<'a> Unpin for SimpleOccurences<'a>
impl<'a> UnwindSafe for SimpleOccurences<'a>
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