# Deleting documents from ElasticSearch when rows are deleted from CSV file

**URL:** <https://discuss.elastic.co/t/deleting-documents-from-elasticsearch-when-rows-are-deleted-from-csv-file/238794>\
**Category:** Logstash\
**Created:** [June 26, 2020, 6:30am UTC](https://discuss.elastic.co/t/deleting-documents-from-elasticsearch-when-rows-are-deleted-from-csv-file/238794 "2020-06-26T06:30:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![damian.bulak](https://avatars.discourse-cdn.com/v4/letter/d/e480ec/32.png) [@damian.bulak](https://discuss.elastic.co/u/damian.bulak)\
**Post date:** [June 26, 2020, 6:30am UTC](https://discuss.elastic.co/t/deleting-documents-from-elasticsearch-when-rows-are-deleted-from-csv-file/238794/1 "2020-06-26T06:30:29Z")

</div>

I have a CSV file which contains data like this:  
111;Some description  
112;Different description

I run Logstash as a Linux service and it loaded the data to ElasticSearch correctly. When I add new lines to the CSV file then Logstash inserts them into ElasticSearch. However, when I delete a row from the CSV file nothing happens.  
How can I make Logstash delete the documents from ElasticSearch when the corresponding lines (with the same ID) are deleted from the CSV file ? Is there any way or should I do do it by myself using the ElasticSearch REST API?

---

<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 24, 2020, 6:43am UTC](https://discuss.elastic.co/t/deleting-documents-from-elasticsearch-when-rows-are-deleted-from-csv-file/238794/2 "2020-07-24T06:43:36Z")

</div>

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