# How can I trigger some code snippet whenever a new document has been indexed?

**URL:** https://discuss.elastic.co/t/how-can-i-trigger-some-code-snippet-whenever-a-new-document-has-been-indexed/5677
**Category:** Elasticsearch
**Created:** [October 25, 2011, 3:18pm UTC](https://discuss.elastic.co/t/how-can-i-trigger-some-code-snippet-whenever-a-new-document-has-been-indexed/5677 "2011-10-25T15:18:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Thomas\_Peuss](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@Thomas\_Peuss](https://discuss.elastic.co/u/Thomas_Peuss)
#### Post date: [October 25, 2011, 3:18pm UTC](https://discuss.elastic.co/t/how-can-i-trigger-some-code-snippet-whenever-a-new-document-has-been-indexed/5677/1 "2011-10-25T15:18:48Z")

</div>

Hi!

Is it possible to trigger a method whenever a new document has been  
indexed? We want to feed that information into another application for  
complex event processing.

CU  
Thomas

---

<div class="post-metadata">

### Author: ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)
#### Post date: [October 25, 2011, 3:20pm UTC](https://discuss.elastic.co/t/how-can-i-trigger-some-code-snippet-whenever-a-new-document-has-been-indexed/5677/2 "2011-10-25T15:20:23Z")

</div>

> <https://github.com/elastic/elasticsearch/issues/1242>
>
> There should be an integration point for ES and external application where the e…xternal applications should be notified of any document changes or updates that happens in ES.
> 
> CouchDB have a good implementation on it and it would be great if ES can also incorporate something similar or same.
> 
> CouchDB change notification feature - http://guide.couchdb.org/draft/notifications.html

Thanks  
Vineeth

On Tue, Oct 25, 2011 at 8:48 PM, Thomas Peuss [thomas.peuss@nterra.com](mailto:thomas.peuss@nterra.com)wrote:

> Hi!
> 
> Is it possible to trigger a method whenever a new document has been  
> indexed? We want to feed that information into another application for  
> complex event processing.
> 
> CU  
> Thomas

---

<div class="post-metadata">

### Author: ![Thomas\_Peuss](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@Thomas\_Peuss](https://discuss.elastic.co/u/Thomas_Peuss)
#### Post date: [October 25, 2011, 3:31pm UTC](https://discuss.elastic.co/t/how-can-i-trigger-some-code-snippet-whenever-a-new-document-has-been-indexed/5677/3 "2011-10-25T15:31:02Z")

</div>

Hi Vineeth!

On 25 Okt., 17:20, Vineeth Mohan [vineethmo...@algotree.com](mailto:vineethmo...@algotree.com) wrote:

> [Changes API · Issue #1242 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1242)

In other words the answer is no. I will follow the issue on github.

Thanks  
Thomas

---

<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 6, 2017, 3:51am UTC](https://discuss.elastic.co/t/how-can-i-trigger-some-code-snippet-whenever-a-new-document-has-been-indexed/5677/4 "2017-07-06T03:51:01Z")

</div>


