From 993aa1321c34b872d2d10dc9c1ba65be54e54e68 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Thu, 18 Aug 2022 17:56:06 +0200 Subject: [PATCH] Fix query tree building --- milli/src/search/query_tree.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/milli/src/search/query_tree.rs b/milli/src/search/query_tree.rs index 4ea594b71..39377d8f9 100644 --- a/milli/src/search/query_tree.rs +++ b/milli/src/search/query_tree.rs @@ -454,7 +454,7 @@ fn create_query_tree( let mut operation_children = Vec::new(); let mut query = query.to_vec(); - for _ in 0..=remove_count { + for _ in 0..remove_count { let pos = match optional_words { TermsMatchingStrategy::All => return ngrams(ctx, authorize_typos, &query, false), TermsMatchingStrategy::Any => { @@ -511,7 +511,7 @@ fn create_query_tree( }; } - Ok(Operation::Or(true, operation_children)) + Ok(Operation::or(true, operation_children)) } /// Main function that matchings words used for crop and highlight.