diff --git a/raptor-http/src/main.rs b/raptor-http/src/main.rs index 9a71cce24..9e81f36d5 100644 --- a/raptor-http/src/main.rs +++ b/raptor-http/src/main.rs @@ -61,8 +61,9 @@ where M: AsRef, D: AsRef, { let mut automatons = Vec::new(); - for query in query.split_whitespace().filter(|q| !common_words.contains(*q)) { - let lev = automaton::build(query); + for query in query.split_whitespace().map(str::to_lowercase) { + if common_words.contains(&query) { continue } + let lev = automaton::build(&query); automatons.push(lev); }