Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bulk operation fail is not correctly parsed #148

Open
Stargateur opened this issue May 15, 2020 · 0 comments · May be fixed by #149
Open

bulk operation fail is not correctly parsed #148

Stargateur opened this issue May 15, 2020 · 0 comments · May be fixed by #149

Comments

@Stargateur
Copy link

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,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant