Use Languages list detected during indexing at search time

This commit is contained in:
ManyTheFish
2023-02-01 18:57:43 +01:00
parent 643d99e0f9
commit 0bc1a18f52
2 changed files with 25 additions and 0 deletions

View File

@ -152,6 +152,11 @@ impl<'a> Search<'a> {
tokbuilder.stop_words(stop_words);
}
let script_lang_map = self.index.script_language(self.rtxn)?;
if !script_lang_map.is_empty() {
tokbuilder.allow_list(&script_lang_map);
}
let tokenizer = tokbuilder.build();
let tokens = tokenizer.tokenize(query);
builder