From 2eae2015d753b9575d81ff4f53aa61bef154c269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Sat, 11 May 2024 11:39:58 +0200 Subject: [PATCH] Support aborting documents edition by function --- milli/src/update/index_documents/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index 0ec4b3739..d3cf2fd12 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -236,6 +236,10 @@ where }; for docid in documents { + if (self.should_abort)() { + return Err(Error::InternalError(InternalError::AbortedIndexation)); + } + let (document, document_object, document_id) = match self.index.documents.get(self.wtxn, &docid)? { Some(obkv) => {