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 throws exception on invalid index name #4987

Closed
rore opened this Issue Feb 2, 2014 · 0 comments

Comments

Projects
None yet
2 participants
@rore
Copy link

commented Feb 2, 2014

When doing a bulk operation, if one of the items holds an invalid index name, the operation returns a top level error (HTTP error in the _bulk API or an exception in case of the Java API).
It's expected it will return the error as part of the bulk result, as done for other types of errors. The error should be returned for the specific item and not fail the entire operation.

Example:

    curl -XPOST "http://localhost:9200/_bulk" -d'
    { "index" : { "_index" : "INVALID.NAME", "_type" : "type1", "_id" : "1"} }
    { "field1" : "value1" }
    '

Returns:

{
   "error": "InvalidIndexNameException[[INVALID.NAME] Invalid index name [INVALID.NAME], must be lowercase]",
   "status": 400
}

@spinscale spinscale self-assigned this Feb 3, 2014

@spinscale spinscale closed this in 056ad0a Mar 31, 2014

spinscale added a commit that referenced this issue Mar 31, 2014

Bulk API: Ensure that specific failures do not affect whole request
Before a bulk request is executed, missing indices are being created by default.
If this fails, the whole request is failed.

This patch changes the behaviour to not fail the whole request, but rather all
requests using the index where the creation has failed.

Closes #4987

spinscale added a commit that referenced this issue Mar 31, 2014

Bulk API: Ensure that specific failures do not affect whole request
Before a bulk request is executed, missing indices are being created by default.
If this fails, the whole request is failed.

This patch changes the behaviour to not fail the whole request, but rather all
requests using the index where the creation has failed.

Closes #4987

@spinscale spinscale added bug labels Mar 31, 2014

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Bulk API: Ensure that specific failures do not affect whole request
Before a bulk request is executed, missing indices are being created by default.
If this fails, the whole request is failed.

This patch changes the behaviour to not fail the whole request, but rather all
requests using the index where the creation has failed.

Closes elastic#4987
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.