diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index 0951cf227..493935a79 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -407,7 +407,7 @@ where // We write the external documents ids into the main database. 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.execute_prefix_databases( diff --git a/milli/src/update/index_documents/transform.rs b/milli/src/update/index_documents/transform.rs index b61395a96..8818909a3 100644 --- a/milli/src/update/index_documents/transform.rs +++ b/milli/src/update/index_documents/transform.rs @@ -249,11 +249,10 @@ impl<'a, 'i> Transform<'a, 'i> { None => self.flattened_sorter.insert(docid.to_be_bytes(), base_obkv)?, } } - } else { - self.new_documents_ids.insert(docid); } if !skip_insertion { + self.new_documents_ids.insert(docid); // We use the extracted/generated user id as the key for this document. self.original_sorter.insert(&docid.to_be_bytes(), obkv_buffer.clone())?;