diff --git a/crates/milli/src/update/new/indexer/document_operation.rs b/crates/milli/src/update/new/indexer/document_operation.rs index d4f11389a..a164d099e 100644 --- a/crates/milli/src/update/new/indexer/document_operation.rs +++ b/crates/milli/src/update/new/indexer/document_operation.rs @@ -356,11 +356,11 @@ impl MergeChanges for MergeDocumentForUpdates { let has_deletion = last_deletion.is_some(); if operations.is_empty() { - return if !is_new { + return if is_new { + Ok(None) + } else { let deletion = Deletion::create(docid, external_docid); Ok(Some(DocumentChange::Deletion(deletion))) - } else { - Ok(None) }; }