# Delete document from index starting with fuzzy match of document id

**URL:** https://discuss.elastic.co/t/delete-document-from-index-starting-with-fuzzy-match-of-document-id/186714
**Category:** Logstash
**Created:** [June 20, 2019, 2:42pm UTC](https://discuss.elastic.co/t/delete-document-from-index-starting-with-fuzzy-match-of-document-id/186714 "2019-06-20T14:42:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![avinash9999](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/avinash9999/32/91409_2.png) [@avinash9999](https://discuss.elastic.co/u/avinash9999)
#### Post date: [June 20, 2019, 2:42pm UTC](https://discuss.elastic.co/t/delete-document-from-index-starting-with-fuzzy-match-of-document-id/186714/1 "2019-06-20T14:42:19Z")

</div>

> I am trying to delete documents whose document\_id starts with sid

output {  
elasticsearch {  
hosts =\> " xyz"  
user =\> "xyz "  
password =\> "xyz "  
index =\> " xyz"  
document\_id =\> "%{sid}\*"  
action =\> 'delete'  
}  
}

> suppose document\_id = 1100-11-11  
> and sid = 1100  
> I want to delete this document\_id using logstash

Thank you!!

---

<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 18, 2019, 2:42pm UTC](https://discuss.elastic.co/t/delete-document-from-index-starting-with-fuzzy-match-of-document-id/186714/2 "2019-07-18T14:42:22Z")

</div>

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