diff --git a/src/search.rs b/src/search.rs index 831042c00..9b2ece375 100644 --- a/src/search.rs +++ b/src/search.rs @@ -6,7 +6,7 @@ use levenshtein_automata::DFA; use levenshtein_automata::LevenshteinAutomatonBuilder as LevBuilder; use log::debug; use once_cell::sync::Lazy; -use roaring::bitmap::{IntoIter, RoaringBitmap}; +use roaring::bitmap::RoaringBitmap; use crate::query_tokens::{QueryTokens, QueryToken}; use crate::{Index, DocumentId}; @@ -132,30 +132,6 @@ impl<'a> Search<'a> { candidates } - fn fecth_keywords( - &self, - derived_words: &[(HashMap, RoaringBitmap)], - candidate: DocumentId, - ) -> anyhow::Result> - { - let mut keywords = Vec::with_capacity(derived_words.len()); - - for (words, _) in derived_words { - - let mut union_positions = RoaringBitmap::new(); - for (word, (_distance, docids)) in words { - - if !docids.contains(candidate) { continue; } - if let Some(positions) = self.index.docid_word_positions.get(self.rtxn, &(candidate, word))? { - union_positions.union_with(&positions); - } - } - keywords.push(union_positions.into_iter()); - } - - Ok(keywords) - } - fn words_pair_combinations<'h>( w1: &'h HashMap, w2: &'h HashMap,