# Index vs Update

**URL:** <https://discuss.elastic.co/t/index-vs-update/280637>\
**Category:** Elasticsearch\
**Created:** [August 6, 2021, 10:06am UTC](https://discuss.elastic.co/t/index-vs-update/280637 "2021-08-06T10:06:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cawoodm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cawoodm/32/14083_2.png) [@cawoodm](https://discuss.elastic.co/u/cawoodm)\
**Post date:** [August 6, 2021, 10:06am UTC](https://discuss.elastic.co/t/index-vs-update/280637/1 "2021-08-06T10:06:03Z")

</div>

Hello

I'd like to ask the same question again raised [here](https://discuss.elastic.co/t/update-vs-index/222243): What's the benefit of the Update API (POST /\_update) vs Index (PUT /\_doc).

As far as I can see Update (with doc\_as\_upsert: true) is identical in effect to Index.

The original answer above suggested that Index did not support partial updates but it does: if you PUT /\_doc with only one field in the request BODY it adds that one field to an existing document.

So are the 2 methods (Update with upsert and Index) identical?

---

<div class="post-metadata">

**Author:** ![cawoodm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cawoodm/32/14083_2.png) [@cawoodm](https://discuss.elastic.co/u/cawoodm)\
**Post date:** [August 6, 2021, 10:07am UTC](https://discuss.elastic.co/t/index-vs-update/280637/2 "2021-08-06T10:07:49Z")

</div>

A little experimentation has shown:

- Index will always update the document's \_version field even if nothing changed
- Update will leave the document (and \_version) unchanged if nothing changed

---

<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:** [August 6, 2021, 10:27am UTC](https://discuss.elastic.co/t/index-vs-update/280637/3 "2021-08-06T10:27:08Z")

</div>

I'm using the update API only if I have a very very big document to update. That would save a bit of network usage and memory.

Otherwise, in 99,9% of the time, I'm only using the index API.

---

<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:** [September 3, 2021, 10:27am UTC](https://discuss.elastic.co/t/index-vs-update/280637/4 "2021-09-03T10:27:31Z")

</div>

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