mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 12:05:05 +08: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…
Reference in New Issue
Block a user