# Can any change made to the source be replicated through a plugin?

**URL:** <https://discuss.elastic.co/t/can-any-change-made-to-the-source-be-replicated-through-a-plugin/55637>\
**Category:** Elasticsearch\
**Created:** [July 15, 2016, 3:59pm UTC](https://discuss.elastic.co/t/can-any-change-made-to-the-source-be-replicated-through-a-plugin/55637 "2016-07-15T15:59:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![adityasinghraghav](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@adityasinghraghav](https://discuss.elastic.co/u/adityasinghraghav)\
**Post date:** [July 15, 2016, 3:59pm UTC](https://discuss.elastic.co/t/can-any-change-made-to-the-source-be-replicated-through-a-plugin/55637/1 "2016-07-15T15:59:59Z")

</div>

There's not really any documentation about the plugin API and I have read that it is somewhat unstable. But I wanted to know what all limitations are there to the API, what should not be done using the API and what parts of the code are not exposed to it. I've also read that from 5.0 several improvements have been made, does that mean that the API will be able to do more in the recent future or are is it about making the existing features more stable ?

---

<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 15, 2016, 4:48pm UTC](https://discuss.elastic.co/t/can-any-change-made-to-the-source-be-replicated-through-a-plugin/55637/2 "2016-07-15T16:48:31Z")

</div>

It is about making the existing features more stable. In 2.x you build stuff with guice so you can do just about anything but it isn't clear what you **should** do. There are lots of things you could do that would make things unstable.

In 5.0 it is getting better. We're switching from guice based registration to Elasticsearch calling the plugin to build the various customizations and providing arguments that make sense. In lots of cases that is no arguments at all. So, for example, if you implement a new analyzer you implement `AnalysisPlugin` and `getAnalyzers` and return a map of `name -> factory`.

As to the question in your title, what is it you want to do? In 5.0 that are ingest pipelines which make changes to the source. There is also mappers and the analysis stuff which changes how the source is indexed and stored.

---

<div class="post-metadata">

**Author:** ![adityasinghraghav](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@adityasinghraghav](https://discuss.elastic.co/u/adityasinghraghav)\
**Post date:** [July 27, 2016, 1:44pm UTC](https://discuss.elastic.co/t/can-any-change-made-to-the-source-be-replicated-through-a-plugin/55637/3 "2016-07-27T13:44:46Z")

</div>

I made some changes to **SearchPhaseController** and the **QueryPhase** classes and now if the rest end point that I have defined is called, I want my overriden methods to be called while the rest of the search process stays the same. Is this something that would be possible through the plugin API in 2.x or even 5.0 ?

---

<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:32pm UTC](https://discuss.elastic.co/t/can-any-change-made-to-the-source-be-replicated-through-a-plugin/55637/4 "2017-07-05T22:32:32Z")

</div>


