# Delete previous document

**URL:** https://discuss.elastic.co/t/delete-previous-document/298602
**Category:** Logstash
**Created:** [March 2, 2022, 9:51am UTC](https://discuss.elastic.co/t/delete-previous-document/298602 "2022-03-02T09:51:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Nasser](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nasser/32/99437_2.png) [@Nasser](https://discuss.elastic.co/u/Nasser)
#### Post date: [March 2, 2022, 9:51am UTC](https://discuss.elastic.co/t/delete-previous-document/298602/1 "2022-03-02T09:51:55Z")

</div>

Hi  
i have jdbc input run every min and i want to delete the previous document that inserted in the index once the schedule run  
how the logstash structure will be ?

---

<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: [March 2, 2022, 6:35pm UTC](https://discuss.elastic.co/t/delete-previous-document/298602/2 "2022-03-02T18:35:15Z")

</div>

You can set the document\_id using a fingerprint filter so that the document is overwritten. See [this](https://discuss.elastic.co/t/threat-intelligence-avoid-redundancy-of-information-in-the-same-index/260303/4) thread.

---

<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: [March 30, 2022, 6:35pm UTC](https://discuss.elastic.co/t/delete-previous-document/298602/3 "2022-03-30T18:35:47Z")

</div>

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