Fix update indexing

This commit is contained in:
ManyTheFish 2022-08-17 15:03:37 +02:00
parent 7384650d85
commit 2668f841d1
2 changed files with 2 additions and 3 deletions

View File

@ -407,7 +407,7 @@ where
// We write the external documents ids into the main database. // We write the external documents ids into the main database.
self.index.put_external_documents_ids(self.wtxn, &external_documents_ids)?; self.index.put_external_documents_ids(self.wtxn, &external_documents_ids)?;
let all_documents_ids = index_documents_ids | new_documents_ids | replaced_documents_ids; let all_documents_ids = index_documents_ids | new_documents_ids;
self.index.put_documents_ids(self.wtxn, &all_documents_ids)?; self.index.put_documents_ids(self.wtxn, &all_documents_ids)?;
self.execute_prefix_databases( self.execute_prefix_databases(

View File

@ -249,11 +249,10 @@ impl<'a, 'i> Transform<'a, 'i> {
None => self.flattened_sorter.insert(docid.to_be_bytes(), base_obkv)?, None => self.flattened_sorter.insert(docid.to_be_bytes(), base_obkv)?,
} }
} }
} else {
self.new_documents_ids.insert(docid);
} }
if !skip_insertion { if !skip_insertion {
self.new_documents_ids.insert(docid);
// We use the extracted/generated user id as the key for this document. // We use the extracted/generated user id as the key for this document.
self.original_sorter.insert(&docid.to_be_bytes(), obkv_buffer.clone())?; self.original_sorter.insert(&docid.to_be_bytes(), obkv_buffer.clone())?;