Address PR review changes

This commit is contained in:
karribalu 2024-07-09 09:18:57 +01:00
parent 47e526f5ea
commit ea21b948b1

View File

@ -304,11 +304,7 @@ pub async fn replace_documents(
debug!(parameters = ?params, "Replace documents"); debug!(parameters = ?params, "Replace documents");
let params = params.into_inner(); let params = params.into_inner();
analytics.add_documents( analytics.add_documents(&params, index_scheduler.index_exists(&index_uid) == Ok(true), &req);
&params,
!matches!(index_scheduler.index_exists(&index_uid), Ok(true)),
&req,
);
let allow_index_creation = index_scheduler.filters().allow_index_creation(&index_uid); let allow_index_creation = index_scheduler.filters().allow_index_creation(&index_uid);
let uid = get_task_id(&req, &opt)?; let uid = get_task_id(&req, &opt)?;
@ -345,11 +341,7 @@ pub async fn update_documents(
let params = params.into_inner(); let params = params.into_inner();
debug!(parameters = ?params, "Update documents"); debug!(parameters = ?params, "Update documents");
analytics.update_documents( analytics.update_documents(&params, index_scheduler.index_exists(&index_uid) == Ok(true), &req);
&params,
!matches!(index_scheduler.index_exists(&index_uid), Ok(true)),
&req,
);
let allow_index_creation = index_scheduler.filters().allow_index_creation(&index_uid); let allow_index_creation = index_scheduler.filters().allow_index_creation(&index_uid);
let uid = get_task_id(&req, &opt)?; let uid = get_task_id(&req, &opt)?;