mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-29 16:45:30 +08:00
fix: Lowercase the query
This commit is contained in:
parent
a8d2fbd3aa
commit
e43dce7274
@ -61,8 +61,9 @@ where M: AsRef<Metadata>,
|
|||||||
D: AsRef<DB>,
|
D: AsRef<DB>,
|
||||||
{
|
{
|
||||||
let mut automatons = Vec::new();
|
let mut automatons = Vec::new();
|
||||||
for query in query.split_whitespace().filter(|q| !common_words.contains(*q)) {
|
for query in query.split_whitespace().map(str::to_lowercase) {
|
||||||
let lev = automaton::build(query);
|
if common_words.contains(&query) { continue }
|
||||||
|
let lev = automaton::build(&query);
|
||||||
automatons.push(lev);
|
automatons.push(lev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user