From 64688b3786561804ec25c0a69a402d64e5456863 Mon Sep 17 00:00:00 2001 From: many Date: Thu, 25 Feb 2021 14:59:40 +0100 Subject: [PATCH] fix query tree builder --- milli/src/search/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/milli/src/search/mod.rs b/milli/src/search/mod.rs index 6046cc8d2..1e3e8eefe 100644 --- a/milli/src/search/mod.rs +++ b/milli/src/search/mod.rs @@ -66,12 +66,12 @@ impl<'a> Search<'a> { let before = Instant::now(); let query_tree = match self.query.as_ref() { Some(query) => { - let builder = QueryTreeBuilder::new(self.rtxn, self.index); + let mut builder = QueryTreeBuilder::new(self.rtxn, self.index); let stop_words = &Set::default(); let analyzer = Analyzer::new(AnalyzerConfig::default_with_stopwords(stop_words)); let result = analyzer.analyze(query); let tokens = result.tokens(); - builder.build(false, true, tokens) + builder.optional_words(false).build(tokens) }, None => None, };