# How to write elasticsearch plugin for 2.2 version

**URL:** <https://discuss.elastic.co/t/how-to-write-elasticsearch-plugin-for-2-2-version/55419>\
**Category:** Elasticsearch\
**Created:** [July 13, 2016, 2:18pm UTC](https://discuss.elastic.co/t/how-to-write-elasticsearch-plugin-for-2-2-version/55419 "2016-07-13T14:18:34Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![gangakrishh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gangakrishh/32/10871_2.png) [@gangakrishh](https://discuss.elastic.co/u/gangakrishh)\
**Post date:** [July 13, 2016, 2:18pm UTC](https://discuss.elastic.co/t/how-to-write-elasticsearch-plugin-for-2-2-version/55419/1 "2016-07-13T14:18:34Z")

</div>

i just want to write simple plugin for elasticsearch !! following seems not valid one

> **[Writing an Elasticsearch Plugin: Getting Started
	  	 | Elastic](https://www.elastic.co/blog/found-writing-a-plugin)**
>
> Using plugins, it's possible to add new functionality to Elasticsearch without having to create a fork of Elasticsearch itself. In this article, we will go through the steps required to create a new Elasticsearch plugin from the ground up.

please help on this?

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [July 13, 2016, 2:26pm UTC](https://discuss.elastic.co/t/how-to-write-elasticsearch-plugin-for-2-2-version/55419/2 "2016-07-13T14:26:55Z")

</div>

You could take a plugin that is similar to the one that you are trying to build and modify it to suit your needs? [https://github.com/elastic/elasticsearch/tree/2.2/plugins](https://github.com/elastic/elasticsearch/tree/2.2/plugins)

---

<div class="post-metadata">

**Author:** ![gangakrishh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gangakrishh/32/10871_2.png) [@gangakrishh](https://discuss.elastic.co/u/gangakrishh)\
**Post date:** [July 13, 2016, 2:29pm UTC](https://discuss.elastic.co/t/how-to-write-elasticsearch-plugin-for-2-2-version/55419/3 "2016-07-13T14:29:10Z")

</div>

is there any standard procedure to develop a plugin?

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [July 13, 2016, 2:42pm UTC](https://discuss.elastic.co/t/how-to-write-elasticsearch-plugin-for-2-2-version/55419/4 "2016-07-13T14:42:19Z")

</div>

No, there is no guide about writing plugins and the API is actually quite unstable. The plugin API is mainly a way for us to provide additional functionality through plugins so that we do not have to fold everything into a single release artifact that would be quite huge. Some community membors have writter plugins by taking inspiration of existing plugins but we do not want to commit on a stable API for plugins as this might prevent us from improving other areas of elasticsearch.

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [July 13, 2016, 3:02pm UTC](https://discuss.elastic.co/t/how-to-write-elasticsearch-plugin-for-2-2-version/55419/5 "2016-07-13T15:02:00Z")

</div>

We're getting it more stable in 5.0. In the master branch mostly you create a class that `extends Plugin` and `implements SearchPlugin` or `implements AnalysisPlugin` or something like that. Those interfaces have methods that you implement to build the things you are adding. Like `SearchPlugin` has `getScoreFunctions` which you could implement to make a new score function (like [script\_score](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#function-script-score) or [field\_value\_factor](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html#function-field-value-factor)).

I've got an open [PR](https://github.com/elastic/elasticsearch/pull/19376) that'll add `getQueries` which you can use add new queries.

What is it you want to add?

---

<div class="post-metadata">

**Author:** ![gangakrishh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gangakrishh/32/10871_2.png) [@gangakrishh](https://discuss.elastic.co/u/gangakrishh)\
**Post date:** [July 13, 2016, 3:06pm UTC](https://discuss.elastic.co/t/how-to-write-elasticsearch-plugin-for-2-2-version/55419/6 "2016-07-13T15:06:30Z")

</div>

when elasticsearch starts need to send info (metadata about this server) to register in Eureka server (netflix). they have some tool [https://github.com/Netflix/Raigad](https://github.com/Netflix/Raigad). it has lot things difficult to understand.  
basically i'm new to elasticsearch.

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [July 13, 2016, 3:25pm UTC](https://discuss.elastic.co/t/how-to-write-elasticsearch-plugin-for-2-2-version/55419/7 "2016-07-13T15:25:16Z")

</div>

Can you describe what task you want to solve by writing a plugin?

---

<div class="post-metadata">

**Author:** ![gangakrishh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gangakrishh/32/10871_2.png) [@gangakrishh](https://discuss.elastic.co/u/gangakrishh)\
**Post date:** [July 13, 2016, 5:26pm UTC](https://discuss.elastic.co/t/how-to-write-elasticsearch-plugin-for-2-2-version/55419/8 "2016-07-13T17:26:13Z")

</div>

need to send the info to Eureka (which provides rest api). need to invoke some rest api (from eureka) in specified interval

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [July 13, 2016, 8:31pm UTC](https://discuss.elastic.co/t/how-to-write-elasticsearch-plugin-for-2-2-version/55419/9 "2016-07-13T20:31:32Z")

</div>

But that looks more like a task for a simple ES client application.

---

<div class="post-metadata">

**Author:** ![gangakrishh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gangakrishh/32/10871_2.png) [@gangakrishh](https://discuss.elastic.co/u/gangakrishh)\
**Post date:** [July 14, 2016, 10:09am UTC](https://discuss.elastic.co/t/how-to-write-elasticsearch-plugin-for-2-2-version/55419/10 "2016-07-14T10:09:42Z")

</div>

what is mean by ES Client? any example plz

---

<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, 10:35pm UTC](https://discuss.elastic.co/t/how-to-write-elasticsearch-plugin-for-2-2-version/55419/11 "2017-07-05T22:35:40Z")

</div>


