mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-23 21:20:24 +01:00
Simplify the words pair proximity computation
This commit is contained in:
parent
9021b2dba6
commit
90d4c1d153
@ -196,9 +196,8 @@ fn compute_words_pair_proximities(
|
||||
// We don't care about a word that appear at the
|
||||
// same position or too far from the other.
|
||||
if prox >= 1 && prox <= 7 {
|
||||
match min_prox {
|
||||
None => min_prox = Some(prox),
|
||||
Some(mp) => if prox < mp { min_prox = Some(prox) },
|
||||
if min_prox.map_or(true, |mp| prox < mp) {
|
||||
min_prox = Some(prox)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user