# Does elasticsearch support functionality like before insert trigger

**URL:** https://discuss.elastic.co/t/does-elasticsearch-support-functionality-like-before-insert-trigger/173033
**Category:** Elasticsearch
**Created:** [March 19, 2019, 6:18pm UTC](https://discuss.elastic.co/t/does-elasticsearch-support-functionality-like-before-insert-trigger/173033 "2019-03-19T18:18:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![adityaPsl](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@adityaPsl](https://discuss.elastic.co/u/adityaPsl)
#### Post date: [March 19, 2019, 6:18pm UTC](https://discuss.elastic.co/t/does-elasticsearch-support-functionality-like-before-insert-trigger/173033/1 "2019-03-19T18:18:54Z")

</div>

Hello Team,

Is it possible to create trigger to check if document with some field value already exist and depending on condition either insert or drop document.

Thank you for your help and support.

Thank you,  
Aditya

---

<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: [March 20, 2019, 8:15am UTC](https://discuss.elastic.co/t/does-elasticsearch-support-functionality-like-before-insert-trigger/173033/2 "2019-03-20T08:15:10Z")

</div>

Hey,

can you explain your use-case a bit more maybe? What exactly are you trying to solve? Is this field in the same document that you are trying to index or in another document. Maybe there is a different way to solve this. In general this is something that you would have to implement yourself.

Have you seen the [ingest node functionality](https://www.elastic.co/guide/en/elasticsearch/reference/6.6/ingest.html)? Using a script processor your could possibly do this already, but again this depends on the concrete use-case, so more information is needed.

--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: [April 17, 2019, 8:15am UTC](https://discuss.elastic.co/t/does-elasticsearch-support-functionality-like-before-insert-trigger/173033/3 "2019-04-17T08:15:17Z")

</div>

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