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,13 +693,15 @@ fn create_matching_words(
|
||||
|
||||
if let Some(synonyms) = ctx.synonyms(&words)? {
|
||||
for synonym in synonyms {
|
||||
let synonym = synonym
|
||||
if let Some(synonym) = synonym
|
||||
.into_iter()
|
||||
.flat_map(|syn| matching_word_cache.insert(syn, 0, false))
|
||||
.collect();
|
||||
.map(|syn| matching_word_cache.insert(syn, 0, false))
|
||||
.collect()
|
||||
{
|
||||
matching_words.push((synonym, ids.clone()));
|
||||
}
|
||||
}
|
||||
}
|
||||
let word = words.concat();
|
||||
let (word_len_one_typo, word_len_two_typo) =
|
||||
ctx.min_word_len_for_typo()?;
|
||||
|
Loading…
Reference in New Issue
Block a user