# Is it possible to load fresh data in elasticsearch index again and again using logstash

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-load-fresh-data-in-elasticsearch-index-again-and-again-using-logstash/194184>\
**Category:** Elasticsearch\
**Created:** [August 7, 2019, 8:50am UTC](https://discuss.elastic.co/t/is-it-possible-to-load-fresh-data-in-elasticsearch-index-again-and-again-using-logstash/194184 "2019-08-07T08:50:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![amritaraj23](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@amritaraj23](https://discuss.elastic.co/u/amritaraj23)\
**Post date:** [August 7, 2019, 8:50am UTC](https://discuss.elastic.co/t/is-it-possible-to-load-fresh-data-in-elasticsearch-index-again-and-again-using-logstash/194184/1 "2019-08-07T08:50:08Z")

</div>

Hi,  
I am new to logstash and elasticsearch. I have a query.  
I have a csv file and the data in the file will keep on changing after every 3 hours. Is it possible to load fresh data to elasticsearch index everytime and delete the entire old data of the index using logstash.

---

<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:** [August 7, 2019, 10:35am UTC](https://discuss.elastic.co/t/is-it-possible-to-load-fresh-data-in-elasticsearch-index-again-and-again-using-logstash/194184/2 "2019-08-07T10:35:37Z")

</div>

Hey,

yes that is possible. I think the easiest way to go would be to index in a new index everytime you do an import, and have an alias point to the latest index, after indexing is finished (the alias pointing cannot be done with logstash however).

Hope this helps.

--Alex

---

<div class="post-metadata">

**Author:** ![amritaraj23](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@amritaraj23](https://discuss.elastic.co/u/amritaraj23)\
**Post date:** [August 7, 2019, 11:41am UTC](https://discuss.elastic.co/t/is-it-possible-to-load-fresh-data-in-elasticsearch-index-again-and-again-using-logstash/194184/3 "2019-08-07T11:41:38Z")

</div>

Thankyou for your reply.  
But in my scenario the index name should be fixed.  
Is there any other way?

--Amrita

---

<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:** [August 7, 2019, 1:34pm UTC](https://discuss.elastic.co/t/is-it-possible-to-load-fresh-data-in-elasticsearch-index-again-and-again-using-logstash/194184/4 "2019-08-07T13:34:22Z")

</div>

you would need to delete that index manually before starting logstash. but then this would work as well.

---

<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 4, 2019, 1:34pm UTC](https://discuss.elastic.co/t/is-it-possible-to-load-fresh-data-in-elasticsearch-index-again-and-again-using-logstash/194184/5 "2019-09-04T13:34:27Z")

</div>

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