Actually execute the transform even if there are only documents to delete

This commit is contained in:
Louis Dureuil 2023-10-25 17:32:45 +02:00
parent 3c15881818
commit e78281785c
No known key found for this signature in database

View File

@ -201,7 +201,7 @@ where
pub fn execute(mut self) -> Result<DocumentAdditionResult> { pub fn execute(mut self) -> Result<DocumentAdditionResult> {
puffin::profile_function!(); puffin::profile_function!();
if self.added_documents == 0 { if self.added_documents == 0 && self.deleted_documents == 0 {
let number_of_documents = self.index.number_of_documents(self.wtxn)?; let number_of_documents = self.index.number_of_documents(self.wtxn)?;
return Ok(DocumentAdditionResult { indexed_documents: 0, number_of_documents }); return Ok(DocumentAdditionResult { indexed_documents: 0, number_of_documents });
} }