-
Notifications
You must be signed in to change notification settings - Fork 40
Description
if one of a bulk operation fail, the return result will not contain field that are here only when succefull such as shards
and _version
, so this result in a jsonerror and so it's impossible to get the error.
Put their field as Option work but there is no error field, I add it in a fork and try this:
#[derive(Debug, serde::Deserialize)]
pub struct BulkError {
#[serde(rename = "type")]
pub kind: String,
pub reason: String,
pub index_uuid: String,
pub shard: String,
pub index: String,
}
following https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docs-bulk.html#bulk-api-response-body but it's reported that index_uuid
was missing, my elastic search is 7.3 so I look https://www.elastic.co/guide/en/elasticsearch/reference/7.3/docs-bulk.html#bulk-api-response-body but response body is not documented, this mean elastic introduce some breaking change in minor version as well, at this point I try to stay calm, anyway, I will try soon:
#[derive(Debug, serde::Deserialize)]
pub struct BulkError {
#[serde(rename = "type")]
pub kind: String,
pub reason: String,
pub index_uuid: Option<String>,
pub shard: String,
pub index: String,
}