FieldIdsMap no longer useful thanks to #4631

This commit is contained in:
Clément Renault 2024-05-22 16:06:15 +02:00
parent 500ddc76b5
commit bc5663e673
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F
2 changed files with 5 additions and 11 deletions

View File

@ -840,9 +840,9 @@ impl<'a, 'i> Transform<'a, 'i> {
original_obkv_buffer: &mut Vec<u8>, original_obkv_buffer: &mut Vec<u8>,
flattened_obkv_buffer: &mut Vec<u8>, flattened_obkv_buffer: &mut Vec<u8>,
) -> Result<()> { ) -> Result<()> {
/// TODO do a XOR of the faceted fields // TODO do a XOR of the faceted fields
/// TODO if reindex_searchable returns true store all searchables else none // TODO if reindex_searchable returns true store all searchables else none
/// TODO no longer useful after Tamo's PR // TODO no longer useful after Tamo's PR
let mut old_fields_ids_map = settings_diff.old.fields_ids_map.clone(); let mut old_fields_ids_map = settings_diff.old.fields_ids_map.clone();
let mut new_fields_ids_map = settings_diff.new.fields_ids_map.clone(); let mut new_fields_ids_map = settings_diff.new.fields_ids_map.clone();
let mut obkv_writer = KvWriter::<_, FieldId>::memory(); let mut obkv_writer = KvWriter::<_, FieldId>::memory();

View File

@ -1099,14 +1099,8 @@ impl InnerIndexSettingsDiff {
} }
pub fn reindex_searchable(&self) -> bool { pub fn reindex_searchable(&self) -> bool {
// TODO no longer useful after Tamo's PR self.old.stop_words.as_ref().map(|set| set.as_fst().as_bytes())
self.old != self.new.stop_words.as_ref().map(|set| set.as_fst().as_bytes())
.fields_ids_map
.iter()
.zip(self.new.fields_ids_map.iter())
.any(|(old, new)| old != new)
|| self.old.stop_words.as_ref().map(|set| set.as_fst().as_bytes())
!= self.new.stop_words.as_ref().map(|set| set.as_fst().as_bytes())
|| self.old.allowed_separators != self.new.allowed_separators || self.old.allowed_separators != self.new.allowed_separators
|| self.old.dictionary != self.new.dictionary || self.old.dictionary != self.new.dictionary
|| self.old.user_defined_searchable_fields != self.new.user_defined_searchable_fields || self.old.user_defined_searchable_fields != self.new.user_defined_searchable_fields