Fix meilisearch-http to use the new DocumentImport batch operation

This commit is contained in:
Kerollmops 2022-09-29 17:41:49 +02:00 committed by Clément Renault
parent 07286fcc79
commit 3b343a930e
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -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();