# How to update a record in ES if storing of field data in \_id will be removed in future?

**URL:** <https://discuss.elastic.co/t/how-to-update-a-record-in-es-if-storing-of-field-data-in-id-will-be-removed-in-future/244265>\
**Category:** Elasticsearch\
**Created:** [August 8, 2020, 8:01pm UTC](https://discuss.elastic.co/t/how-to-update-a-record-in-es-if-storing-of-field-data-in-id-will-be-removed-in-future/244265 "2020-08-08T20:01:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aryaman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aryaman/32/66961_2.png) [@aryaman](https://discuss.elastic.co/u/aryaman)\
**Post date:** [August 8, 2020, 8:01pm UTC](https://discuss.elastic.co/t/how-to-update-a-record-in-es-if-storing-of-field-data-in-id-will-be-removed-in-future/244265/1 "2020-08-08T20:01:21Z")

</div>

Hi,  
I use python Elasticsearch client for sending new documents to Elasticsearch and updating already existing records as well.  
My client request looks like this:  
`es.index(index='index_name',ignore=400,id=dict['LogicalID'], body=json_string)`

How creation/updation works:  
If the id does not exist in ES then it is stored as a new record.  
If the id already exists in ES then the existing document is replaced with the new doc.(Updated)

From deprecation logs:  
Loading the fielddata on the \_id field is deprecated and will be removed in future versions.

Right now it knows whether it's a new record or existing one based on the value of id field that I set using field\_data.

My question is how will I be able to update a record in the future if I can no longer pass the value of \_id field?

I am hoping that you guys might know how to deal this issue or have a workaround.  
Thanks

---

<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 5, 2020, 8:01pm UTC](https://discuss.elastic.co/t/how-to-update-a-record-in-es-if-storing-of-field-data-in-id-will-be-removed-in-future/244265/2 "2020-09-05T20:01:26Z")

</div>

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