# DELETE all data feom logstash

**URL:** <https://discuss.elastic.co/t/delete-all-data-feom-logstash/161284>\
**Category:** Logstash\
**Created:** [December 18, 2018, 8:36am UTC](https://discuss.elastic.co/t/delete-all-data-feom-logstash/161284 "2018-12-18T08:36:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![saeed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saeed/32/38500_2.png) [@saeed](https://discuss.elastic.co/u/saeed)\
**Post date:** [December 18, 2018, 8:36am UTC](https://discuss.elastic.co/t/delete-all-data-feom-logstash/161284/1 "2018-12-18T08:36:09Z")

</div>

Hi  
How can i delete data from an elasticsearch index (just data, not setting) using logstash?  
I want to reindex data from SQLServer. If GET my\_index/\_count is \> 0 then delete all of them and reload that index from my SQLServer table.  
please help.  
Thanks

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 18, 2018, 8:38am UTC](https://discuss.elastic.co/t/delete-all-data-feom-logstash/161284/2 "2018-12-18T08:38:52Z")

</div>

Logstash is designed to handle streams of events, so do as far as I know not support that kind of workflow.

---

<div class="post-metadata">

**Author:** ![saeed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saeed/32/38500_2.png) [@saeed](https://discuss.elastic.co/u/saeed)\
**Post date:** [December 18, 2018, 8:42am UTC](https://discuss.elastic.co/t/delete-all-data-feom-logstash/161284/3 "2018-12-18T08:42:25Z")

</div>

This means I can not set new index with my custom settings like analyzers or ...  
Then I must use kibana to handle it.  
Thank you to help.

---

<div class="post-metadata">

**Author:** ![saeed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saeed/32/38500_2.png) [@saeed](https://discuss.elastic.co/u/saeed)\
**Post date:** [December 18, 2018, 8:56am UTC](https://discuss.elastic.co/t/delete-all-data-feom-logstash/161284/4 "2018-12-18T08:56:34Z")

</div>

Can I find 'not exists' record in my index?  
For example I must index 4 , 5 , 6 and 7 that 6 is exists in my index and I don't want to have duplicate data.

---

<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:** [January 15, 2019, 8:56am UTC](https://discuss.elastic.co/t/delete-all-data-feom-logstash/161284/5 "2019-01-15T08:56:37Z")

</div>

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