# Unable to delete the document in the elasticserach using logstash action

**URL:** <https://discuss.elastic.co/t/unable-to-delete-the-document-in-the-elasticserach-using-logstash-action/246744>\
**Category:** Logstash\
**Created:** [August 28, 2020, 10:55am UTC](https://discuss.elastic.co/t/unable-to-delete-the-document-in-the-elasticserach-using-logstash-action/246744 "2020-08-28T10:55:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shashikala\_G](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shashikala_g/32/74689_2.png) [@Shashikala\_G](https://discuss.elastic.co/u/Shashikala_G)\
**Post date:** [August 28, 2020, 10:55am UTC](https://discuss.elastic.co/t/unable-to-delete-the-document-in-the-elasticserach-using-logstash-action/246744/1 "2020-08-28T10:55:24Z")

</div>

Hello there,

I am using elasticsearch 7.6.2 version on a single node windows machine. i am trying to delete documents from elastic search using logstash.

delete.csv:  
272586  
logstash configuration file:

input{  
stdin  
{  
codec =\> plain { charset=\>"UTF-8" }  
}  
file {  
path =\> "D:/E-drive/Softwares/logstash-7.6.2/config/delete.csv"  
start\_position =\> "beginning"  
sincedb\_path =\> "null"  
}  
}

filter {  
csv {  
columns =\> ["strategyId"]  
separator =\> ","  
}  
}

output {  
stdout {  
codec =\> json\_lines  
}  
elasticsearch {  
hosts =\> "[http://localhost:9200](http://localhost:9200)"  
index =\> "data"  
document\_type =\> "strategy"  
action =\> "delete"  
document\_id =\> "%{strategyId}"  
}  
}

record doesn't get Deleted from Elasticserach.  
[2020-08-28T16:23:44,681][DEBUG][logstash.filters.csv][main] Event after csv filter {:event=\>#LogStash::Event:0x3b92483f}  
{"path":"D:/E-drive/Softwares/logstash-7.6.2/config/delete.csv","@timestamp":"2020-08-28T10:53:44.432Z","message":"272586\r","@version":"1","host":"BG3WS0276","strategyId":"272586"}  
[2020-08-28T16:23:44,898][DEBUG][logstash.instrument.periodicpoller.cgroup] One or more required cgroup files or directories not found: /proc/self/cgroup, /sys/fs/cgroup/cpuacct, /sys/fs/cgroup/cpu  
[2020-08-28T16:23:44,998][DEBUG][logstash.instrument.periodicpoller.jvm] collector name {:name=\>"ParNew"}  
[2020-08-28T16:23:44,998][DEBUG][logstash.instrument.periodicpoller.jvm] collector name {:name=\>"ConcurrentMarkSweep"}

Please let me know any issue in my configuration file

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 28, 2020, 4:32pm UTC](https://discuss.elastic.co/t/unable-to-delete-the-document-in-the-elasticserach-using-logstash-action/246744/2 "2020-08-28T16:32:08Z")

</div>

If you delete the document\_type option on the output does that make any difference?

---

<div class="post-metadata">

**Author:** ![Shashikala\_G](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shashikala_g/32/74689_2.png) [@Shashikala\_G](https://discuss.elastic.co/u/Shashikala_G)\
**Post date:** [August 31, 2020, 6:25am UTC](https://discuss.elastic.co/t/unable-to-delete-the-document-in-the-elasticserach-using-logstash-action/246744/3 "2020-08-31T06:25:11Z")

</div>

> [@Badger](#):
>
> If you delete the document\_type option on the output does that make any difference?

index is created with strategy type. If i don't specify the document type it defaults to \_doc. then i would get index not found. I am using logstash 7.6.2 version.

---

<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 28, 2020, 6:25am UTC](https://discuss.elastic.co/t/unable-to-delete-the-document-in-the-elasticserach-using-logstash-action/246744/4 "2020-09-28T06:25:28Z")

</div>

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