From 34d04f3d3f94adb51aecca199f2084f30a3128d0 Mon Sep 17 00:00:00 2001 From: f3r10 Date: Fri, 14 Oct 2022 16:22:42 -0500 Subject: [PATCH] Filter from script_language_docids database soft deleted documents --- milli/src/index.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/milli/src/index.rs b/milli/src/index.rs index 03f16a126..dc9cb7994 100644 --- a/milli/src/index.rs +++ b/milli/src/index.rs @@ -1199,7 +1199,9 @@ impl Index { /* script language docids */ /// Retrieve all the documents ids that correspond with (Script, Language) key, `None` if it is any. pub fn script_language_documents_ids(&self, rtxn: &RoTxn, key: &(Script, Language)) -> heed::Result> { - self.script_language_docids.get(rtxn, key) + let soft_deleted_documents = self.soft_deleted_documents_ids(rtxn)?; + let doc_ids = self.script_language_docids.get(rtxn, key)?; + Ok(doc_ids.map(|ids| ids - soft_deleted_documents)) } }