diff --git a/milli/src/update/prefix_word_pairs/prefix_word.rs b/milli/src/update/prefix_word_pairs/prefix_word.rs index cbc9ac0b2..18f5bdc5a 100644 --- a/milli/src/update/prefix_word_pairs/prefix_word.rs +++ b/milli/src/update/prefix_word_pairs/prefix_word.rs @@ -44,7 +44,7 @@ pub fn index_prefix_word_database( let mut cursor = new_word_pair_proximity_docids.clone().into_prefix_iter(prefix_key)?; // This is the core of the algorithm execute_on_word_pairs_and_prefixes( - proximity + 1, + proximity, prefix.as_bytes(), // the next two arguments tell how to iterate over the new word pairs &mut cursor, @@ -91,7 +91,7 @@ pub fn index_prefix_word_database( .prefix_iter::<_, ByteSlice, ByteSlice>(wtxn, prefix_key.as_slice())? .remap_key_type::(); execute_on_word_pairs_and_prefixes( - proximity + 1, + proximity, prefix.as_bytes(), &mut db_iter, |db_iter| { diff --git a/milli/src/update/prefix_word_pairs/snapshots/mod.rs/test_update/update/prefix_word_pair_proximity_docids.snap b/milli/src/update/prefix_word_pairs/snapshots/mod.rs/test_update/update/prefix_word_pair_proximity_docids.snap index c5f45a9eb..7644c433d 100644 --- a/milli/src/update/prefix_word_pairs/snapshots/mod.rs/test_update/update/prefix_word_pair_proximity_docids.snap +++ b/milli/src/update/prefix_word_pairs/snapshots/mod.rs/test_update/update/prefix_word_pair_proximity_docids.snap @@ -1,29 +1,29 @@ --- source: milli/src/update/prefix_word_pairs/mod.rs --- -2 a 5 [101, ] +1 a 5 [101, ] +1 a amazing [100, ] +1 a an [100, 202, ] +1 a and [100, ] +1 a beautiful [100, ] +1 a extraordinary [202, ] +1 am and [100, ] +1 an amazing [100, ] +1 an beautiful [100, ] +1 an extraordinary [202, ] +1 b house [100, ] +1 b rings [101, ] +1 be house [100, ] +1 be rings [101, ] +2 a am [101, ] 2 a amazing [100, ] -2 a an [100, 202, ] 2 a and [100, ] 2 a beautiful [100, ] 2 a extraordinary [202, ] -2 am and [100, ] -2 an amazing [100, ] -2 an beautiful [100, ] -2 an extraordinary [202, ] -2 b house [100, ] -2 b rings [101, ] -2 be house [100, ] -2 be rings [101, ] -3 a am [101, ] -3 a amazing [100, ] -3 a and [100, ] -3 a beautiful [100, ] -3 a extraordinary [202, ] -3 a house [100, 202, ] -3 am beautiful [100, ] -3 an and [100, ] -3 an house [100, 202, ] -3 b at [101, ] -3 be at [101, ] +2 a house [100, 202, ] +2 am beautiful [100, ] +2 an and [100, ] +2 an house [100, 202, ] +2 b at [101, ] +2 be at [101, ]