mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-22 03:07:27 +01: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…
x
Reference in New Issue
Block a user