Set disabled_words to default when Index::exact_words returns None

This commit is contained in:
ManyTheFish 2022-06-06 15:54:50 +02:00
parent 173eea06e1
commit f5306eb5b0
1 changed files with 4 additions and 6 deletions

View File

@ -175,12 +175,10 @@ impl Index {
two_typos: Setting::Set(self.min_word_len_two_typos(txn)?),
};
let disabled_words = self
.exact_words(txn)?
.into_stream()
.into_strs()?
.into_iter()
.collect();
let disabled_words = match self.exact_words(txn)? {
Some(fst) => fst.into_stream().into_strs()?.into_iter().collect(),
None => BTreeSet::new(),
};
let disabled_attributes = self
.exact_attributes(txn)?