# Elastic plugin that is called before insert?

**URL:** <https://discuss.elastic.co/t/elastic-plugin-that-is-called-before-insert/35904>\
**Category:** Elasticsearch\
**Created:** [November 30, 2015, 2:10pm UTC](https://discuss.elastic.co/t/elastic-plugin-that-is-called-before-insert/35904 "2015-11-30T14:10:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarcelHallmann](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@MarcelHallmann](https://discuss.elastic.co/u/MarcelHallmann)\
**Post date:** [November 30, 2015, 2:10pm UTC](https://discuss.elastic.co/t/elastic-plugin-that-is-called-before-insert/35904/1 "2015-11-30T14:10:50Z")

</div>

Hi,

I want to create a plugin (or something similar) that inspects the data sent from logstash before it is inserted in elastic.  
I found this documentation: [https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html#native-java-scripts](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html#native-java-scripts)

But how can I tell elastic that my code should be called before the insert occurs?  
Is a plugin the correct way?

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [December 4, 2015, 12:30am UTC](https://discuss.elastic.co/t/elastic-plugin-that-is-called-before-insert/35904/2 "2015-12-04T00:30:46Z")

</div>

Take a look at ingest nodes. They are being developed right now, and will allows this exact functionality:

> <https://github.com/elastic/elasticsearch/issues/14049>

---

<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 5, 2017, 11:33pm UTC](https://discuss.elastic.co/t/elastic-plugin-that-is-called-before-insert/35904/3 "2017-07-05T23:33:44Z")

</div>


