mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-23 05:14:27 +01:00
fix query tree builder
This commit is contained in:
parent
fb7e6df790
commit
64688b3786
@ -66,12 +66,12 @@ impl<'a> Search<'a> {
|
|||||||
let before = Instant::now();
|
let before = Instant::now();
|
||||||
let query_tree = match self.query.as_ref() {
|
let query_tree = match self.query.as_ref() {
|
||||||
Some(query) => {
|
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 stop_words = &Set::default();
|
||||||
let analyzer = Analyzer::new(AnalyzerConfig::default_with_stopwords(stop_words));
|
let analyzer = Analyzer::new(AnalyzerConfig::default_with_stopwords(stop_words));
|
||||||
let result = analyzer.analyze(query);
|
let result = analyzer.analyze(query);
|
||||||
let tokens = result.tokens();
|
let tokens = result.tokens();
|
||||||
builder.build(false, true, tokens)
|
builder.optional_words(false).build(tokens)
|
||||||
},
|
},
|
||||||
None => None,
|
None => None,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user