mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 10:37:41 +08:00
Don't create partial matching words for synonyms in ngrams
This commit is contained in:
parent
f70856bab1
commit
61b58b115a
@ -693,11 +693,13 @@ fn create_matching_words(
|
|||||||
|
|
||||||
if let Some(synonyms) = ctx.synonyms(&words)? {
|
if let Some(synonyms) = ctx.synonyms(&words)? {
|
||||||
for synonym in synonyms {
|
for synonym in synonyms {
|
||||||
let synonym = synonym
|
if let Some(synonym) = synonym
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.flat_map(|syn| matching_word_cache.insert(syn, 0, false))
|
.map(|syn| matching_word_cache.insert(syn, 0, false))
|
||||||
.collect();
|
.collect()
|
||||||
matching_words.push((synonym, ids.clone()));
|
{
|
||||||
|
matching_words.push((synonym, ids.clone()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let word = words.concat();
|
let word = words.concat();
|
||||||
|
Loading…
Reference in New Issue
Block a user