# Update by Query in the Background

**URL:** <https://discuss.elastic.co/t/update-by-query-in-the-background/356342>\
**Category:** Elasticsearch\
**Created:** [March 27, 2024, 10:09pm UTC](https://discuss.elastic.co/t/update-by-query-in-the-background/356342 "2024-03-27T22:09:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xef](https://avatars.discourse-cdn.com/v4/letter/x/898d66/32.png) [@xef](https://discuss.elastic.co/u/xef)\
**Post date:** [March 27, 2024, 10:09pm UTC](https://discuss.elastic.co/t/update-by-query-in-the-background/356342/1 "2024-03-27T22:09:40Z")

</div>

Is there any possiblity/features that we can use in Elasticsearch to run an update by query on millions of records but in a background process so that it does not affect the normal search and query performance.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 28, 2024, 3:26am UTC](https://discuss.elastic.co/t/update-by-query-in-the-background/356342/2 "2024-03-28T03:26:01Z")

</div>

You could imagine running a reindex call to create a new index with the new content and then switch the alias from the old to the new index and delete the old index.

---

<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:** [April 25, 2024, 3:26am UTC](https://discuss.elastic.co/t/update-by-query-in-the-background/356342/3 "2024-04-25T03:26:19Z")

</div>

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