mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 10:37:41 +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
|
// We don't care about a word that appear at the
|
||||||
// same position or too far from the other.
|
// same position or too far from the other.
|
||||||
if prox >= 1 && prox <= 7 {
|
if prox >= 1 && prox <= 7 {
|
||||||
match min_prox {
|
if min_prox.map_or(true, |mp| prox < mp) {
|
||||||
None => min_prox = Some(prox),
|
min_prox = Some(prox)
|
||||||
Some(mp) => if prox < mp { min_prox = Some(prox) },
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user