# Is there a functionality like before insert available

**URL:** https://discuss.elastic.co/t/is-there-a-functionality-like-before-insert-available/174700
**Category:** Logstash
**Created:** [April 1, 2019, 2:29am UTC](https://discuss.elastic.co/t/is-there-a-functionality-like-before-insert-available/174700 "2019-04-01T02:29:32Z")
**Posts on this page:** 2
**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: [April 1, 2019, 2:29am UTC](https://discuss.elastic.co/t/is-there-a-functionality-like-before-insert-available/174700/1 "2019-04-01T02:29:32Z")

</div>

Hello Team,

Is it possible to check if document with matching query is already available in the index? if yes use the indexed field value to set field in new document. If match is not found create a field with default value.  
I am trying elasticsearch filter plugin.  
Could you please let me know if there is any other options available to achieve this.

Elasticsearch and Logstash version is 6.3

Thank you,  
Aditya

---

<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 29, 2019, 2:29am UTC](https://discuss.elastic.co/t/is-there-a-functionality-like-before-insert-available/174700/2 "2019-04-29T02:29:39Z")

</div>

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