# \_update\_by\_query support doc {}

**URL:** https://discuss.elastic.co/t/-update-by-query-support-doc/59100
**Category:** Elasticsearch
**Created:** [August 27, 2016, 8:58pm UTC](https://discuss.elastic.co/t/-update-by-query-support-doc/59100 "2016-08-27T20:58:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![teebu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/teebu/32/10119_2.png) [@teebu](https://discuss.elastic.co/u/teebu)
#### Post date: [August 27, 2016, 8:58pm UTC](https://discuss.elastic.co/t/-update-by-query-support-doc/59100/1 "2016-08-27T20:58:33Z")

</div>

Does `_update_by_query` support doc {} or only script?

I'd like to update the doc's using values. In a similar way `_update` works, by passing doc {}.

---

<div class="post-metadata">

### Author: ![aros](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@aros](https://discuss.elastic.co/u/aros)
#### Post date: [October 18, 2016, 4:07pm UTC](https://discuss.elastic.co/t/-update-by-query-support-doc/59100/2 "2016-10-18T16:07:11Z")

</div>

I also would like to have this feature. Any plans for this?

---

<div class="post-metadata">

### Author: ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)
#### Post date: [October 18, 2016, 4:37pm UTC](https://discuss.elastic.co/t/-update-by-query-support-doc/59100/3 "2016-10-18T16:37:04Z")

</div>

This is tracked as a "we don't know" feature request [here](https://github.com/elastic/elasticsearch/issues/20135).

In 5.0 this becomes less important because 5.0 ships with Painless which is a scripting language that is enabled by default because it is safe. Personally I prefer it having to reason about what the `doc` merging code does and I'm quite familiar with that code. I get the appeal though. It "just works" in lots of cases.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 5, 2017, 10:11pm UTC](https://discuss.elastic.co/t/-update-by-query-support-doc/59100/4 "2017-07-05T22:11:30Z")

</div>


