# Configuring a Watcher to detect document changes in an Index

**URL:** <https://discuss.elastic.co/t/configuring-a-watcher-to-detect-document-changes-in-an-index/104096>\
**Category:** Elasticsearch\
**Created:** [October 16, 2017, 1:43pm UTC](https://discuss.elastic.co/t/configuring-a-watcher-to-detect-document-changes-in-an-index/104096 "2017-10-16T13:43:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarkG](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@MarkG](https://discuss.elastic.co/u/MarkG)\
**Post date:** [October 16, 2017, 1:43pm UTC](https://discuss.elastic.co/t/configuring-a-watcher-to-detect-document-changes-in-an-index/104096/1 "2017-10-16T13:43:00Z")

</div>

What I'm trying to achieve is to see if it's possible to detect changes to a document in an index.

Basically if any part of the document changes I want the watcher to trigger a microservice to capture the changes.

I was hoping I could output the "old" (as in pre-update) contents of a document utilizing the watcher plugin but a watcher is triggered after the fact so it appears the best I can do is see if a timestamp field has been updated, for example, and output the document to a web service.

Thanks in advance.

Regards,

Mark Gillen

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 18, 2017, 10:20am UTC](https://discuss.elastic.co/t/configuring-a-watcher-to-detect-document-changes-in-an-index/104096/2 "2017-10-18T10:20:33Z")

</div>

Elasticsearch does not store the old revision of a document, so there is no way to extract this with watcher, you could only detect that a change has happened by querying for a last modified timestamp or something similar and trigger something based on that using a HTTP output.

--Alex

---

<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:** [November 15, 2017, 10:20am UTC](https://discuss.elastic.co/t/configuring-a-watcher-to-detect-document-changes-in-an-index/104096/3 "2017-11-15T10:20:35Z")

</div>

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