Don't add swapped word pairs to the word_pair_proximity_docids db

This commit is contained in:
Loïc Lecrenier 2022-09-14 15:35:15 +02:00 committed by Loïc Lecrenier
parent 264a04922d
commit a7de4f5b85

View File

@ -106,17 +106,6 @@ fn document_word_positions_into_sorter<'b>(
*p = cmp::min(*p, prox); *p = cmp::min(*p, prox);
}) })
.or_insert(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);
}
} }
} }