# Update vs Reindex

**URL:** <https://discuss.elastic.co/t/update-vs-reindex/269929>\
**Category:** Elasticsearch\
**Created:** [April 12, 2021, 5:48pm UTC](https://discuss.elastic.co/t/update-vs-reindex/269929 "2021-04-12T17:48:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhishekc92](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@abhishekc92](https://discuss.elastic.co/u/abhishekc92)\
**Post date:** [April 12, 2021, 5:48pm UTC](https://discuss.elastic.co/t/update-vs-reindex/269929/1 "2021-04-12T17:48:52Z")

</div>

Hello,

I am evaluating a few ways of organizing my indices. One of the questions I had was generally speaking, what is the difference in overhead(if any) between updating a document within an index vs using the reindex API to move a document from one index to another? Is there a difference at all behind the scenes in terms of one approach being able to scale better? Thanks!

---

<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:** [April 12, 2021, 9:37pm UTC](https://discuss.elastic.co/t/update-vs-reindex/269929/2 "2021-04-12T21:37:27Z")

</div>

Assuming you don't delete the reindexed document, it's a lower cost operation.

---

<div class="post-metadata">

**Author:** ![abhishekc92](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@abhishekc92](https://discuss.elastic.co/u/abhishekc92)\
**Post date:** [April 12, 2021, 9:46pm UTC](https://discuss.elastic.co/t/update-vs-reindex/269929/3 "2021-04-12T21:46:14Z")

</div>

Thanks for the reply. To clarify, are you saying that reindex is a lower cost operation than an update?

---

<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:** [April 12, 2021, 9:49pm UTC](https://discuss.elastic.co/t/update-vs-reindex/269929/4 "2021-04-12T21:49:59Z")

</div>

Yes.  
An update is a reindex of the original document, then marking that original as deleted, then having to merge it out of the segement.

A reindex adds the original document to a new segment in a new index (usually), and leaves the original.

---

<div class="post-metadata">

**Author:** ![abhishekc92](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@abhishekc92](https://discuss.elastic.co/u/abhishekc92)\
**Post date:** [April 12, 2021, 10:03pm UTC](https://discuss.elastic.co/t/update-vs-reindex/269929/5 "2021-04-12T22:03:14Z")

</div>

If I happened to delete the original document after reindexing, it would be approximately the same cost as an update behind the scenes?

---

<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:** [April 12, 2021, 10:04pm UTC](https://discuss.elastic.co/t/update-vs-reindex/269929/6 "2021-04-12T22:04:31Z")

</div>

Ultimately, yes.

---

<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:** [May 10, 2021, 10:05pm UTC](https://discuss.elastic.co/t/update-vs-reindex/269929/7 "2021-05-10T22:05:15Z")

</div>

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