# Index vs Update for partial updates

**URL:** <https://discuss.elastic.co/t/index-vs-update-for-partial-updates/272590>\
**Category:** Elasticsearch\
**Created:** [May 10, 2021, 2:17pm UTC](https://discuss.elastic.co/t/index-vs-update-for-partial-updates/272590 "2021-05-10T14:17:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bogdanjsx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bogdanjsx/32/108181_2.png) [@bogdanjsx](https://discuss.elastic.co/u/bogdanjsx)\
**Post date:** [May 10, 2021, 2:17pm UTC](https://discuss.elastic.co/t/index-vs-update-for-partial-updates/272590/1 "2021-05-10T14:17:44Z")

</div>

Hello!

I'm having a hard time deciding on the Index vs Update APIs for a particular use case.  
Let's say I have an index with documents containing a `name` field, which nests a string translated in different languages/locales:

```auto
    name: {
      "en-US": "Something",
      "en-GB": "Something else",
      ...
    }

```

Once every few seconds, I need to update a set such docs (1000s), but since I can't know all the languages inside the `name` field, I want the behavior of Index - overwrite the entire field instead of upserting only the provided languages.  
However, ~99% of the time, nothing is changed in the document, so it would be reindexed when a noop would be more fitting.

So, to summarize:

- Index reindexes noops, which happen most of the time.
- Update does not delete fields not provided in the request.

Is there a solution for this?

---

<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:** [May 10, 2021, 11:23pm UTC](https://discuss.elastic.co/t/index-vs-update-for-partial-updates/272590/2 "2021-05-10T23:23:28Z")

</div>

From an Elasticsearch point of view, this sort of thing is decided in the client, or it'll treat the request as an update and replace the document as you are seeing.

---

<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 7, 2021, 11:24pm UTC](https://discuss.elastic.co/t/index-vs-update-for-partial-updates/272590/3 "2021-06-07T23:24:24Z")

</div>

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