diff --git a/milli/src/search/criteria/mod.rs b/milli/src/search/criteria/mod.rs index d1c482b38..76718c8ec 100644 --- a/milli/src/search/criteria/mod.rs +++ b/milli/src/search/criteria/mod.rs @@ -431,12 +431,17 @@ pub fn resolve_phrase(ctx: &dyn Context, phrase: &[Option]) -> Result bitmaps.push(m), diff --git a/milli/src/search/query_tree.rs b/milli/src/search/query_tree.rs index 3237bb9d3..a9c1ac29f 100755 --- a/milli/src/search/query_tree.rs +++ b/milli/src/search/query_tree.rs @@ -589,11 +589,8 @@ fn create_matching_words( PrimitiveQueryPart::Phrase(words) => { let ids: Vec<_> = (0..words.len()).into_iter().map(|i| id + i as PrimitiveWordId).collect(); - let words = words - .into_iter() - .flatten() - .map(|w| MatchingWord::new(w, 0, false)) - .collect(); + let words = + words.into_iter().flatten().map(|w| MatchingWord::new(w, 0, false)).collect(); matching_words.push((words, ids)); } } diff --git a/milli/src/update/index_documents/extract/extract_word_position_docids.rs b/milli/src/update/index_documents/extract/extract_word_position_docids.rs index b7015d2ce..d95db4157 100644 --- a/milli/src/update/index_documents/extract/extract_word_position_docids.rs +++ b/milli/src/update/index_documents/extract/extract_word_position_docids.rs @@ -41,7 +41,7 @@ pub fn extract_word_position_docids( key_buffer.extend_from_slice(word_bytes); key_buffer.extend_from_slice(&position.to_be_bytes()); - word_position_docids_sorter.insert(&key_buffer,document_id.to_ne_bytes())?; + word_position_docids_sorter.insert(&key_buffer, document_id.to_ne_bytes())?; } }