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 update doesn't support fields parameter #11527

Closed
clintongormley opened this issue Jun 7, 2015 · 0 comments
Closed

Bulk update doesn't support fields parameter #11527

clintongormley opened this issue Jun 7, 2015 · 0 comments
Assignees
Labels
:Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. >enhancement good first issue low hanging fruit

Comments

@clintongormley
Copy link

The fields parameter in the update API allows the user to retrieve the updated _source field. This support is missing in the bulk update API:

PUT test/test/1
{
  "foo": 1
}

POST /test/test/1/_update?fields=_source
{
  "doc": {
    "foo": 2
  }
}

Neither the QS param nor in the body return the _source field:

POST /test/test/_bulk?fields=_source
{"update": { "_id": 1}}
{"fields": ["_source"], "doc": {"foo": 3}}

And throws an exception if specified in the metadata line:

POST /test/test/_bulk
{"update": { "_id": 1, "fields": "_source"}}
{"doc": {"foo": 3}}
@jasontedor jasontedor self-assigned this Jul 8, 2015
@jasontedor jasontedor removed the help wanted adoptme label Jul 8, 2015
jasontedor added a commit that referenced this issue Jul 8, 2015
Add support for retrieving fields in bulk updates

This commit adds support to retrieve fields when using the bulk update API. This functionality was previously available for the update API
but not for the bulk update API.

Closes #11527
@lcawl lcawl added :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. and removed :Bulk labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. >enhancement good first issue low hanging fruit
Projects
None yet
Development

No branches or pull requests

3 participants