perf: Prevent reindex in searchable reset case when not needed

This commit is contained in:
Gregory Conrad 2022-11-23 22:01:46 -05:00
parent d19c8672bb
commit bb9e33bf85

View File

@ -373,13 +373,11 @@ impl<'a, 't, 'u, 'i> Settings<'a, 't, 'u, 'i> {
&new_fields_ids_map,
)?;
self.index.put_fields_ids_map(self.wtxn, &new_fields_ids_map)?;
Ok(true)
}
Setting::Reset => {
self.index.delete_all_searchable_fields(self.wtxn)?;
}
Setting::Reset => Ok(self.index.delete_all_searchable_fields(self.wtxn)?),
Setting::NotSet => return Ok(false),
}
Ok(true)
}
fn update_stop_words(&mut self) -> Result<bool> {