# Update a single field in every document in an Engine

**URL:** <https://discuss.elastic.co/t/update-a-single-field-in-every-document-in-an-engine/230886>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [May 3, 2020, 4:02pm UTC](https://discuss.elastic.co/t/update-a-single-field-in-every-document-in-an-engine/230886 "2020-05-03T16:02:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpribi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gpribi/32/65066_2.png) [@gpribi](https://discuss.elastic.co/u/gpribi)\
**Post date:** [May 3, 2020, 4:02pm UTC](https://discuss.elastic.co/t/update-a-single-field-in-every-document-in-an-engine/230886/1 "2020-05-03T16:02:41Z")

</div>

Hello, I need to set a new value in a single value of all the documents on an Engine.  
In SQL it would like `UPDATE <field>=123 FROM <table>`

Since the PATCH operation needs the ID to be sent, the only way i found is use the API to make multiple LIST requests (every LIST can return 10k documents and I have more), and then make several PATCH requests.

Logstash is discarded since it can't make PATCH requests (I made a topic with that issue and had no answer: [How to generate PATCH requests using the AppSearch output plugin?](https://discuss.elastic.co/t/how-to-generate-patch-requests-using-the-appsearch-output-plugin/229784))

Is there a more straightforward way to do this massive updates in all the engine?

---

<div class="post-metadata">

**Author:** ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)\
**Post date:** [May 4, 2020, 1:10pm UTC](https://discuss.elastic.co/t/update-a-single-field-in-every-document-in-an-engine/230886/2 "2020-05-04T13:10:11Z")

</div>

Not to my knowledge, unfortunately.

I would typically recommend explicitly setting the ids of documents in app search to match the ids from your system to make updates like this easier, so that you could skip the list step and just iterate over all ids from your source system.

---

<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:** [June 1, 2020, 1:10pm UTC](https://discuss.elastic.co/t/update-a-single-field-in-every-document-in-an-engine/230886/3 "2020-06-01T13:10:16Z")

</div>

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