# Update based on values from other index

**URL:** <https://discuss.elastic.co/t/update-based-on-values-from-other-index/169838>\
**Category:** Elasticsearch\
**Created:** [February 25, 2019, 1:09pm UTC](https://discuss.elastic.co/t/update-based-on-values-from-other-index/169838 "2019-02-25T13:09:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pszemesy](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@pszemesy](https://discuss.elastic.co/u/pszemesy)\
**Post date:** [February 25, 2019, 1:09pm UTC](https://discuss.elastic.co/t/update-based-on-values-from-other-index/169838/1 "2019-02-25T13:09:18Z")

</div>

Hi All,  
Can anyone tell me how can I update a field in an index based on a query from another index?  
In SQL it should be something UPDATE a SET a.x =(SELECT b.y FROM b WHERE b.z = a.z) WHERE a.w = "somevalue".  
Thanks,  
Peter

---

<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:** [March 25, 2019, 1:09pm UTC](https://discuss.elastic.co/t/update-based-on-values-from-other-index/169838/2 "2019-03-25T13:09:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
