Skip to content

Bulk: Add support for update to bulk api #2982

@martijnvg

Description

@martijnvg

Add support for the update operation in the bulk api.

Update requests should be put in the bulk api. All update request options should be supported.

Example usage:

curl -XPOST 'localhost:9200/_bulk' --date-binary @bulk.json

Contents of bulk.json that contains two update request items:

{ "update" : {"_id" : "1", "_type" : "type1", "_index" : "index1", "_retry_on_conflict" : 3} }
{ "doc" : {"field" : "value"} }
{ "update" : { "_id" : "0", "_type" : "type1", "_index" : "index1", "_retry_on_conflict" : 3} }
{ "script" : "counter += param1", "lang" : "js", "params" : {"param1" : 1}, "upsert" : {"counter" : 1}}

The doc, upsert and all script related options are part of the payload. The retry_on_conflict option is part of the header.

Relates to #1985

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions