From 22b84fe543c5f0d34d80a39db22e4c564f410378 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Wed, 3 Mar 2021 12:12:35 +0100 Subject: [PATCH] Use the words criterion in the search module --- 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 93cac34b6..51f81f540 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 mut builder = QueryTreeBuilder::new(self.rtxn, self.index); + let 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(tokens) + builder.build(tokens)? }, None => None, };