From ea21b948b17ac12f75e02f8bc7ae751b461e2917 Mon Sep 17 00:00:00 2001 From: karribalu Date: Tue, 9 Jul 2024 09:18:57 +0100 Subject: [PATCH] Address PR review changes --- meilisearch/src/routes/indexes/documents.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/meilisearch/src/routes/indexes/documents.rs b/meilisearch/src/routes/indexes/documents.rs index bf2042d81..12c79d20e 100644 --- a/meilisearch/src/routes/indexes/documents.rs +++ b/meilisearch/src/routes/indexes/documents.rs @@ -304,11 +304,7 @@ pub async fn replace_documents( debug!(parameters = ?params, "Replace documents"); let params = params.into_inner(); - analytics.add_documents( - ¶ms, - !matches!(index_scheduler.index_exists(&index_uid), Ok(true)), - &req, - ); + analytics.add_documents(¶ms, index_scheduler.index_exists(&index_uid) == Ok(true), &req); let allow_index_creation = index_scheduler.filters().allow_index_creation(&index_uid); let uid = get_task_id(&req, &opt)?; @@ -345,11 +341,7 @@ pub async fn update_documents( let params = params.into_inner(); debug!(parameters = ?params, "Update documents"); - analytics.update_documents( - ¶ms, - !matches!(index_scheduler.index_exists(&index_uid), Ok(true)), - &req, - ); + analytics.update_documents(¶ms, index_scheduler.index_exists(&index_uid) == Ok(true), &req); let allow_index_creation = index_scheduler.filters().allow_index_creation(&index_uid); let uid = get_task_id(&req, &opt)?;