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

View File

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