From dd03a6256a9b1d9d0892a21242a10d5184078e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Mon, 9 Dec 2019 16:45:06 +0100 Subject: [PATCH] Debug pre filtered number of documents --- meilisearch-core/src/bucket_sort.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meilisearch-core/src/bucket_sort.rs b/meilisearch-core/src/bucket_sort.rs index ae0fdf63f..fcbe5a262 100644 --- a/meilisearch-core/src/bucket_sort.rs +++ b/meilisearch-core/src/bucket_sort.rs @@ -57,14 +57,17 @@ pub fn bucket_sort<'c>( debug!("sort by documents ids took {:.02?}", before_raw_documents_presort.elapsed()); let before_raw_documents_building = Instant::now(); + let mut prefiltered_documents = 0; let mut raw_documents = Vec::new(); for raw_matches in bare_matches.linear_group_by_key_mut(|sm| sm.document_id) { + prefiltered_documents += 1; if let Some(raw_document) = RawDocument::new(raw_matches, &automatons, &arena) { raw_documents.push(raw_document); } } - debug!("creating {} candidates documents took {:.02?}", + debug!("creating {} (original {}) candidates documents took {:.02?}", raw_documents.len(), + prefiltered_documents, before_raw_documents_building.elapsed(), );