Update milli/src/search/query_tree.rs

Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
Many 2021-06-08 17:52:37 +02:00 committed by GitHub
parent b489d699ce
commit faf148d297
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -475,7 +475,7 @@ fn create_primitive_query(query: TokenStream, stop_words: Option<Set<&[u8]>>, wo
if quote_count % 2 != 0 {
quoted = !quoted;
}
// if there are any quote or any hard separator we close the phrase.
// if there is a quote or a hard separator we close the phrase.
if !phrase.is_empty() && (quote_count > 0 || separator_kind == SeparatorKind::Hard) {
primitive_query.push(PrimitiveQueryPart::Phrase(mem::take(&mut phrase)));
}