From 3b343a930e114400ae3f10ab899860c1c98a7914 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Thu, 29 Sep 2022 17:41:49 +0200 Subject: [PATCH] Fix meilisearch-http to use the new DocumentImport batch operation --- .../src/routes/indexes/documents.rs | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/meilisearch-http/src/routes/indexes/documents.rs b/meilisearch-http/src/routes/indexes/documents.rs index 954839302..a62fb7869 100644 --- a/meilisearch-http/src/routes/indexes/documents.rs +++ b/meilisearch-http/src/routes/indexes/documents.rs @@ -285,24 +285,13 @@ async fn document_addition( } }; - let task = match method { - IndexDocumentsMethod::ReplaceDocuments => KindWithContent::DocumentAddition { - content_file: uuid, - documents_count, - primary_key, - allow_index_creation, - index_uid, - }, - - IndexDocumentsMethod::UpdateDocuments => KindWithContent::DocumentUpdate { - content_file: uuid, - documents_count, - primary_key, - allow_index_creation, - index_uid, - }, - // TODO: TAMO: can I get rids of the `non_exhaustive` on the IndexDocumentsMethod enum - _ => todo!(), + let task = KindWithContent::DocumentImport { + method, + content_file: uuid, + documents_count, + primary_key, + allow_index_creation, + index_uid, }; let scheduler = index_scheduler.clone();