# Index Operation Update and delete existing records in elastic search

**URL:** https://discuss.elastic.co/t/index-operation-update-and-delete-existing-records-in-elastic-search/69413
**Category:** Elasticsearch
**Created:** [December 19, 2016, 9:39am UTC](https://discuss.elastic.co/t/index-operation-update-and-delete-existing-records-in-elastic-search/69413 "2016-12-19T09:39:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vikrant\_trivedi](https://avatars.discourse-cdn.com/v4/letter/v/258eb7/32.png) [@vikrant\_trivedi](https://discuss.elastic.co/u/vikrant_trivedi)
#### Post date: [December 19, 2016, 9:39am UTC](https://discuss.elastic.co/t/index-operation-update-and-delete-existing-records-in-elastic-search/69413/1 "2016-12-19T09:39:05Z")

</div>

I have used this way to creating index and fetching data from it.  
client.index({  
index: 'check',  
id: '1',  
type: 'test',  
body: {  
"bussiness\_id": i,  
"name": 'Vikrant',  
"city": address[0].city,  
}

```
            }, function (err, resp, status) {
                if (err) {
                    console.log(err);
                } else {
                  console.log(res+' ****'+status);
                }
            });

```

But i am not able to update and delete this existing record. Please help me out for the same, its bit urgent. Thanks

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [December 19, 2016, 9:55am UTC](https://discuss.elastic.co/t/index-operation-update-and-delete-existing-records-in-elastic-search/69413/2 "2016-12-19T09:55:05Z")

</div>

Please edit your post and move it to the Elasticsearch category. It doesn't belong in Elastic User Groups.

---

<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: [December 19, 2016, 9:57am UTC](https://discuss.elastic.co/t/index-operation-update-and-delete-existing-records-in-elastic-search/69413/3 "2016-12-19T09:57:58Z")

</div>

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will make your post more readable.

Update is like an index operation. Just send again the same request and you're done.  
Delete. What did you try so far?

---

<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: [July 5, 2017, 10:04pm UTC](https://discuss.elastic.co/t/index-operation-update-and-delete-existing-records-in-elastic-search/69413/4 "2017-07-05T22:04:49Z")

</div>


