Support the searchable attributes in the new Settings Indexer #5983
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims to improve the current settings by supporting the update of searchable attributes with the new settings indexer.
The new indexer is designed to significantly reduce disk writes. Its main approach is to read documents directly from LMDB instead of duplicating the dataset into a temporary file and processing it from scratch each time a setting change occurs. Instead, we calculate the difference between the settings and apply only the necessary changes. This second iteration adds support for searchable attributes, following the previous support for embedders.
To Do
Settings::execute:L1600.MetadataBuilderandFieldIdMapWithMetadata.Index::fields_ids_map_with_metadatato get old settings.update_searchable_configsin settings.rs:L1633.SettingsDeltain indexer/mod.rs:L235.SettingsChangeEmbeddingExtractor.disableOnAttributescorresponds toexact_word_docids.word_fid_docidsandfid_word_count_docidscan only be imnpacted by added/removed searchable fields.insert_del_u32we should touch theword_fid_docidsand thefid_word_count_docidsif the current field has been added or deleted from the list (we can add a boolean to help).WordDocidsSettingsExtractorandWordPairProximityDocidsSettingsExtractor.WordPairProximityDocidsSettingsExtractor, copy and paste theWordPairProximityDocidsExtractorlogic.