# Elasticsearch immutable

**URL:** <https://discuss.elastic.co/t/elasticsearch-immutable/302413>\
**Category:** Elasticsearch\
**Created:** [April 14, 2022, 9:28am UTC](https://discuss.elastic.co/t/elasticsearch-immutable/302413 "2022-04-14T09:28:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![111401](https://avatars.discourse-cdn.com/v4/letter/1/e19b73/32.png) [@111401](https://discuss.elastic.co/u/111401)\
**Post date:** [April 14, 2022, 9:28am UTC](https://discuss.elastic.co/t/elasticsearch-immutable/302413/1 "2022-04-14T09:28:58Z")

</div>

Hi,

I try to understand immutable in Elasticsearch, and read the article [Updating API](https://www.elastic.co/guide/en/elasticsearch/guide/current/update-doc.html) and [Partial Update API](https://www.elastic.co/guide/en/elasticsearch/guide/current/partial-updates.html) , but still not clear about it.  
The article said Documents in Elasticsearch are _immutable_, but the Update API mentioned that

> Elasticsearch has marked the old document as deleted and added an entirely new document. The old version of the document doesn’t disappear immediately, although you won’t be able to access it. Elasticsearch cleans up deleted documents in the background as you continue to index more data.

According to my understanding, it said the original document will be delete and the update will be add into a new document.  
It will be delete if an updating API occur, why it still an immutable document?

Thanks for any reply.

---

<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 12, 2022, 9:29am UTC](https://discuss.elastic.co/t/elasticsearch-immutable/302413/2 "2022-05-12T09:29:42Z")

</div>

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