mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 00:31:02 +00:00
Merge #3067
3067: Fix task details serialization r=Kerollmops a=ManyTheFish # Pull Request - document addition task details always contain the field `indexedDocuments` - value is set to `null` when the task is enqueued or processing - value is set to `0` when the task is canceled or failed - the field `deletedDocuments` of the document deletion task details is set to `0` when the task is canceled or failed - the field `deletedDocuments` of the document clearAll task details is set to `0` when the task is canceled or failed - the field `deletedTasks` of the task deletion task details is set to `0` when the task is canceled or failed - the field `canceledTasks` of the task cancelation task details is set to `0` when the task is canceled or failed ## Related issue Fixes #3057 Fixes #3058 Co-authored-by: ManyTheFish <many@meilisearch.com>
This commit is contained in:
@ -82,7 +82,7 @@ pub struct DetailsView {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub received_documents: Option<u64>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub indexed_documents: Option<u64>,
|
||||
pub indexed_documents: Option<Option<u64>>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub primary_key: Option<Option<String>>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
@ -112,7 +112,7 @@ impl From<Details> for DetailsView {
|
||||
Details::DocumentAdditionOrUpdate { received_documents, indexed_documents } => {
|
||||
DetailsView {
|
||||
received_documents: Some(received_documents),
|
||||
indexed_documents,
|
||||
indexed_documents: Some(indexed_documents),
|
||||
..DetailsView::default()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user