mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 10:37:41 +08:00
fix: Only create non-prefix DFA when generating synonyms alternatives
This commit is contained in:
parent
a76c00a787
commit
8f044c6853
@ -45,7 +45,7 @@ fn generate_automatons<S: Store>(query: &str, store: &S) -> Result<Vec<(usize, D
|
||||
while let Some(synonyms) = stream.next() {
|
||||
let synonyms = std::str::from_utf8(synonyms).unwrap();
|
||||
for synonym in split_query_string(synonyms) {
|
||||
let lev = if not_prefix_dfa { build_dfa(synonym) } else { build_prefix_dfa(synonym) };
|
||||
let lev = build_dfa(synonym);
|
||||
automatons.push((index, synonym.to_owned(), lev));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user