# Update documents based on other updates

**URL:** <https://discuss.elastic.co/t/update-documents-based-on-other-updates/280237>\
**Category:** Elasticsearch\
**Created:** [August 2, 2021, 3:45pm UTC](https://discuss.elastic.co/t/update-documents-based-on-other-updates/280237 "2021-08-02T15:45:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nilei](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nilei/32/90186_2.png) [@nilei](https://discuss.elastic.co/u/nilei)\
**Post date:** [August 2, 2021, 3:45pm UTC](https://discuss.elastic.co/t/update-documents-based-on-other-updates/280237/1 "2021-08-02T15:45:32Z")

</div>

Hi 👋

I have two indices where one of them potentially contains several million documents (let us say index "installation") and the other one only a few hundreds (index "product" for now). Now, I want to update some of the "installation"s if there was an update in one of the "product"s. The updated "product" has a field called "latest\_version" whose value needs to be updated in the "installation"s field "product\_latest\_version" that contains the old "latest\_version" value.

I can do this manually with the Update API, searching for all "installation"s with "product\_latest\_version" matching "1.2.3" and updating the field to "1.2.4" (as an example), but I would like to automate this as much as possible with Elasticsearch built-in tools. I was looking for something like stored procedures that can be triggered based on an update event in any of the "product"s. It's important to know that I can only make use of the BASIC license features.

Many thanks for any advice on this use case.

-- Cheers, Nils

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 2, 2021, 10:44pm UTC](https://discuss.elastic.co/t/update-documents-based-on-other-updates/280237/2 "2021-08-02T22:44:56Z")

</div>

There's nothing like this native to Elasticsearch sorry to say. You'd need to handle it in your code outside of Elasticsearch.

---

<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:** [August 30, 2021, 10:45pm UTC](https://discuss.elastic.co/t/update-documents-based-on-other-updates/280237/3 "2021-08-30T22:45:28Z")

</div>

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