mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-25 19:45:05 +08:00
feat: Assert that query are not invalid ones
This commit is contained in:
parent
f5dd776efd
commit
f0f5fc9891
@ -16,6 +16,8 @@ impl LevBuilder {
|
||||
}
|
||||
|
||||
pub fn get_automaton(&self, query: &str) -> Levenshtein {
|
||||
assert!(!query.is_empty());
|
||||
|
||||
let dfa = if query.len() <= 4 {
|
||||
self.automatons[0].build_prefix_dfa(query)
|
||||
} else if query.len() <= 8 {
|
||||
|
Loading…
Reference in New Issue
Block a user