mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
Skip indexing on settings update when possible,
when removing a field from the filterable settings, this will trigger a reindexing of the negative version of the document, which removes the document from the searchable as well because the field was considered removed.
This commit is contained in:
parent
40776ed4cd
commit
5d191c479e
1 changed files with 6 additions and 1 deletions
|
@ -29,7 +29,6 @@ pub fn extract_docid_word_positions<R: io::Read + io::Seek>(
|
||||||
let max_positions_per_attributes = max_positions_per_attributes
|
let max_positions_per_attributes = max_positions_per_attributes
|
||||||
.map_or(MAX_POSITION_PER_ATTRIBUTE, |max| max.min(MAX_POSITION_PER_ATTRIBUTE));
|
.map_or(MAX_POSITION_PER_ATTRIBUTE, |max| max.min(MAX_POSITION_PER_ATTRIBUTE));
|
||||||
let max_memory = indexer.max_memory_by_thread();
|
let max_memory = indexer.max_memory_by_thread();
|
||||||
let force_reindexing = settings_diff.reindex_searchable();
|
|
||||||
|
|
||||||
// initialize destination values.
|
// initialize destination values.
|
||||||
let mut documents_ids = RoaringBitmap::new();
|
let mut documents_ids = RoaringBitmap::new();
|
||||||
|
@ -43,6 +42,12 @@ pub fn extract_docid_word_positions<R: io::Read + io::Seek>(
|
||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let force_reindexing = settings_diff.reindex_searchable();
|
||||||
|
let skip_indexing = !force_reindexing && settings_diff.settings_update_only();
|
||||||
|
if skip_indexing {
|
||||||
|
return sorter_into_reader(docid_word_positions_sorter, indexer);
|
||||||
|
}
|
||||||
|
|
||||||
// initialize buffers.
|
// initialize buffers.
|
||||||
let mut del_buffers = Buffers::default();
|
let mut del_buffers = Buffers::default();
|
||||||
let mut add_buffers = Buffers::default();
|
let mut add_buffers = Buffers::default();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue