# Replace the data of an existing index in Elastic using Logstash

**URL:** https://discuss.elastic.co/t/replace-the-data-of-an-existing-index-in-elastic-using-logstash/199107
**Category:** Logstash
**Created:** [September 11, 2019, 4:26pm UTC](https://discuss.elastic.co/t/replace-the-data-of-an-existing-index-in-elastic-using-logstash/199107 "2019-09-11T16:26:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![baselai](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@baselai](https://discuss.elastic.co/u/baselai)
#### Post date: [September 11, 2019, 4:26pm UTC](https://discuss.elastic.co/t/replace-the-data-of-an-existing-index-in-elastic-using-logstash/199107/1 "2019-09-11T16:26:11Z")

</div>

is it possible to overwrite the data of an existed index in elasticsearch using logstash when I re-process a json file?

---

<div class="post-metadata">

### Author: ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)
#### Post date: [September 11, 2019, 7:50pm UTC](https://discuss.elastic.co/t/replace-the-data-of-an-existing-index-in-elastic-using-logstash/199107/2 "2019-09-11T19:50:05Z")

</div>

yes, look for thing call action =\> update.

you have to have same document id for that.

---

<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: [October 9, 2019, 7:50pm UTC](https://discuss.elastic.co/t/replace-the-data-of-an-existing-index-in-elastic-using-logstash/199107/3 "2019-10-09T19:50:08Z")

</div>

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