Skip to content

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

@jbaiera

Description

@jbaiera

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"}}}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions