fix(reindex): reindex in a few more cases

Cases: whenever searchable_fields OR user_defined_searchable_fields is modified
This commit is contained in:
Gregory Conrad 2022-11-28 13:12:19 -05:00
parent d3182f3830
commit 87e2bc3bed

View File

@ -560,8 +560,9 @@ impl Index {
}
pub(crate) fn delete_all_searchable_fields(&self, wtxn: &mut RwTxn) -> heed::Result<bool> {
self.delete_searchable_fields(wtxn)?;
self.delete_user_defined_searchable_fields(wtxn)
let did_delete_searchable = self.delete_searchable_fields(wtxn)?;
let did_delete_user_defined = self.delete_user_defined_searchable_fields(wtxn)?;
Ok(did_delete_searchable || did_delete_user_defined)
}
/// Writes the searchable fields, when this list is specified, only these are indexed.