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

Update/Upsert bulk actions with scripts are broken for ES 1.x as of 5.0.0-alpha5 #817

Closed
jbaiera opened this issue Aug 1, 2016 · 0 comments

Comments

@jbaiera
Copy link
Contributor

commented Aug 1, 2016

In ES 5.0.0-alpha5, the format for using scripts in bulk update and upsert operations has changed such that it only accepts a strict object notation for the script part:

The following no longer works in 5.X but is required for 1.X:

{"update":{"_id":"1"}}
{"params":{"new_address":{"zipcode":"12367","id":"3"}},"script":"ctx._source.address+=new_address","upsert":{"id":"1","address":{"zipcode":"12345","id":"1"}}}

The following is required for 5.X but does not work in 1.X:

{"update":{"_id":"1"}}
{"script":{"inline":"ctx._source.address+=new_address","params":{"new_address":{"zipcode":"12367","id":"3"}}},"upsert":{"id":"1","address":{"zipcode":"12345","id":"1"}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.