# How to monitor deleted document information

**URL:** <https://discuss.elastic.co/t/how-to-monitor-deleted-document-information/380241>\
**Category:** Elasticsearch\
**Created:** [July 18, 2025, 3:09am UTC](https://discuss.elastic.co/t/how-to-monitor-deleted-document-information/380241 "2025-07-18T03:09:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![double-7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/double-7/32/144218_2.png) [@double-7](https://discuss.elastic.co/u/double-7)\
**Post date:** [July 18, 2025, 3:09am UTC](https://discuss.elastic.co/t/how-to-monitor-deleted-document-information/380241/1 "2025-07-18T03:09:48Z")

</div>

hello . I need everyone's help.  
Currently, I want to perform document monitoring on the ES server. I can accomplish this by using the `_seq_no` attribute to monitor the addition and modification of documents. However, when it comes to document deletions, what API or method should I use to monitor and obtain the ID of the deleted document

---

<div class="post-metadata">

**Author:** ![Carlos\_D](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_d/32/126245_2.png) [@Carlos\_D](https://discuss.elastic.co/u/Carlos_D)\
**Post date:** [August 1, 2025, 9:21am UTC](https://discuss.elastic.co/t/how-to-monitor-deleted-document-information/380241/2 "2025-08-01T09:21:37Z")

</div>

Hi @double-7 !

There is no API that provides the IDs of deleted documents. Elasticsearch is based on Lucene, and Lucene does not track the IDs of deleted docs in a way they can be related to Elasticsearch document IDs.

You can use some alternatives, that will require changes at your application level:

- Use soft deletes. Instead of deleting docs, you could add a `is_deleted` field to the docs that is set to `true` when docs are deleted, and use it as a filter on your queries.
- Maintain a separate index of deleted doc IDs, updated when docs are deleted.

I hope that helps!

---

<div class="post-metadata">

**Author:** ![double-7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/double-7/32/144218_2.png) [@double-7](https://discuss.elastic.co/u/double-7)\
**Post date:** [August 4, 2025, 1:09am UTC](https://discuss.elastic.co/t/how-to-monitor-deleted-document-information/380241/3 "2025-08-04T01:09:11Z")

</div>

This is very helpful. Thank you
