diff --git a/meilisearch-http/src/routes/indexes/documents.rs b/meilisearch-http/src/routes/indexes/documents.rs index 5788fc815..863b21650 100644 --- a/meilisearch-http/src/routes/indexes/documents.rs +++ b/meilisearch-http/src/routes/indexes/documents.rs @@ -263,6 +263,11 @@ async fn document_addition( }; } + if let Err(e) = buffer.flush().await { + error!("bufWriter flush error: {}", e); + return Err(MeilisearchHttpError::Payload(ReceivePayloadErr)); + }; + if buffer_write_size == 0 { return Err(MeilisearchHttpError::MissingPayload(format)); }