# Updating a record in elastic search

**URL:** <https://discuss.elastic.co/t/updating-a-record-in-elastic-search/117762>\
**Category:** Elasticsearch\
**Created:** [January 31, 2018, 8:11am UTC](https://discuss.elastic.co/t/updating-a-record-in-elastic-search/117762 "2018-01-31T08:11:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![get2ashish](https://avatars.discourse-cdn.com/v4/letter/g/58956e/32.png) [@get2ashish](https://discuss.elastic.co/u/get2ashish)\
**Post date:** [January 31, 2018, 8:11am UTC](https://discuss.elastic.co/t/updating-a-record-in-elastic-search/117762/1 "2018-01-31T08:11:36Z")

</div>

Hi Team,  
I want to completely update a record (no partial update). How do i update it? Do i use a bulk api or update by query can some share me the syntax hard to find in the documentation ☹  
i have prepared by object which needs to be updated how to i pass it as a payload?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [January 31, 2018, 8:25am UTC](https://discuss.elastic.co/t/updating-a-record-in-elastic-search/117762/2 "2018-01-31T08:25:37Z")

</div>

Hey,

it is exactly the same as storing the document initially. The document will be overwritten.

--Alex

---

<div class="post-metadata">

**Author:** ![kanu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kanu/32/27148_2.png) [@kanu](https://discuss.elastic.co/u/kanu)\
**Post date:** [January 31, 2018, 8:26am UTC](https://discuss.elastic.co/t/updating-a-record-in-elastic-search/117762/3 "2018-01-31T08:26:15Z")

</div>

You can use the index api to overwrite existing documents  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index\_.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html)

---

<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:** [February 28, 2018, 8:26am UTC](https://discuss.elastic.co/t/updating-a-record-in-elastic-search/117762/4 "2018-02-28T08:26:20Z")

</div>

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