From a7de4f5b854715198c1c537f8bb7010d7f614b75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Lecrenier?= Date: Wed, 14 Sep 2022 15:35:15 +0200 Subject: [PATCH] Don't add swapped word pairs to the word_pair_proximity_docids db --- .../extract/extract_word_pair_proximity_docids.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/milli/src/update/index_documents/extract/extract_word_pair_proximity_docids.rs b/milli/src/update/index_documents/extract/extract_word_pair_proximity_docids.rs index 3837c1bbe..25117c706 100644 --- a/milli/src/update/index_documents/extract/extract_word_pair_proximity_docids.rs +++ b/milli/src/update/index_documents/extract/extract_word_pair_proximity_docids.rs @@ -106,17 +106,6 @@ fn document_word_positions_into_sorter<'b>( *p = cmp::min(*p, prox); }) .or_insert(prox); - - // We also compute the inverse proximity. - let prox = prox + 1; - if prox < MAX_DISTANCE { - word_pair_proximity - .entry((word.clone(), head.word.clone())) - .and_modify(|p| { - *p = cmp::min(*p, prox); - }) - .or_insert(prox); - } } }