diff --git a/milli/src/search/new/mod.rs b/milli/src/search/new/mod.rs index ae0c245ef..d40449eef 100644 --- a/milli/src/search/new/mod.rs +++ b/milli/src/search/new/mod.rs @@ -247,14 +247,14 @@ fn resolve_negative_words( #[tracing::instrument(level = "trace", skip_all, target = "search")] fn resolve_negative_phrases( ctx: &mut SearchContext, - universe: Option<&RoaringBitmap>, + _universe: Option<&RoaringBitmap>, negative_phrases: &[LocatedQueryTerm], ) -> Result { let mut negative_bitmap = RoaringBitmap::new(); for term in negative_phrases { let query_term = ctx.term_interner.get(term.value); if let Some(phrase) = query_term.original_phrase() { - negative_bitmap |= ctx.get_phrase_docids(universe, phrase)?; + negative_bitmap |= ctx.get_phrase_docids(None, phrase)?; } } Ok(negative_bitmap) diff --git a/milli/src/search/new/ranking_rule_graph/exactness/mod.rs b/milli/src/search/new/ranking_rule_graph/exactness/mod.rs index 42b1558e1..973b630ea 100644 --- a/milli/src/search/new/ranking_rule_graph/exactness/mod.rs +++ b/milli/src/search/new/ranking_rule_graph/exactness/mod.rs @@ -29,7 +29,7 @@ fn compute_docids( let candidates = match exact_term { // TODO I move the intersection here - ExactTerm::Phrase(phrase) => ctx.get_phrase_docids(Some(universe), phrase)? & universe, + ExactTerm::Phrase(phrase) => ctx.get_phrase_docids(None, phrase)? & universe, ExactTerm::Word(word) => { ctx.word_docids(Some(universe), Word::Original(word))?.unwrap_or_default() } diff --git a/milli/src/search/new/ranking_rule_graph/proximity/compute_docids.rs b/milli/src/search/new/ranking_rule_graph/proximity/compute_docids.rs index 8eded8815..5ac8fa873 100644 --- a/milli/src/search/new/ranking_rule_graph/proximity/compute_docids.rs +++ b/milli/src/search/new/ranking_rule_graph/proximity/compute_docids.rs @@ -74,7 +74,7 @@ pub fn compute_docids( if right_derivs.len() > 1 { let universe = &universe; if let Some(left_phrase) = left_phrase { - if universe.is_disjoint(ctx.get_phrase_docids(Some(universe), left_phrase)?) { + if universe.is_disjoint(ctx.get_phrase_docids(None, left_phrase)?) { continue; } } else if let Some(left_word_docids) = ctx.word_docids(Some(universe), left_word)? { @@ -126,7 +126,7 @@ fn compute_prefix_edges( // TODO we can clearly give the universe to this method // Unfortunately, it is deserializing/computing stuff and // keeping the result as a materialized bitmap. - let phrase_docids = ctx.get_phrase_docids(Some(&universe), phrase)?; + let phrase_docids = ctx.get_phrase_docids(None, phrase)?; if !phrase_docids.is_empty() { used_left_phrases.insert(phrase); } @@ -184,7 +184,7 @@ fn compute_non_prefix_edges( let mut universe = universe.clone(); for phrase in left_phrase.iter().chain(right_phrase.iter()).copied() { - universe &= ctx.get_phrase_docids(Some(&universe), phrase)?; + universe &= ctx.get_phrase_docids(None, phrase)?; if universe.is_empty() { return Ok(()); } diff --git a/milli/src/search/new/resolve_query_graph.rs b/milli/src/search/new/resolve_query_graph.rs index fe36f07fd..ac3f01fb0 100644 --- a/milli/src/search/new/resolve_query_graph.rs +++ b/milli/src/search/new/resolve_query_graph.rs @@ -47,7 +47,7 @@ pub fn compute_query_term_subset_docids( } } for phrase in term.all_phrases(ctx)? { - docids |= ctx.get_phrase_docids(universe, phrase)?; + docids |= ctx.get_phrase_docids(None, phrase)?; } if let Some(prefix) = term.use_prefix_db(ctx) { @@ -80,7 +80,7 @@ pub fn compute_query_term_subset_docids_within_field_id( // guaranteed that all of its words are within a single fid. if let Some(word) = phrase.words(ctx).iter().flatten().next() { if let Some(word_fid_docids) = ctx.get_db_word_fid_docids(universe, *word, fid)? { - docids |= ctx.get_phrase_docids(Some(&word_fid_docids), phrase)?; + docids |= ctx.get_phrase_docids(None, phrase)? & word_fid_docids; } } } @@ -118,7 +118,7 @@ pub fn compute_query_term_subset_docids_within_position( if let Some(word_position_docids) = ctx.get_db_word_position_docids(universe, *word, position)? { - docids |= ctx.get_phrase_docids(Some(&word_position_docids), phrase)?; + docids |= ctx.get_phrase_docids(None, phrase)? & word_position_docids; } } }