How to get started with Elasticsearch plugin development?

I am trying to write a plugin for Elasticsearch for a project of mine.
I want the plugin to be able to send the results of a query to an external api which will then return a new score for each of the result. I then want to combine the score of the elastic search results with the newly obtained scores to generate a custom ranking for the results.

I do not have much experience with Elasticsearch and am only vaguely familiar with it's codebase. I wasn't able to find much documentation for plugin development. After looking at various examples, I felt like plugin development requires an in-depth knowledge of the elasticsearch codebase and am not sure what the correct approach is to go about it.

Are there any resources available that explain the plugin development process in detail and how should someone like me approach the learning process and what kind of plan of attack I should have for tackling my use-case


I think the best starting point is to check out the various queries, that are already shipped with each Elasticsearch release. You can clone the source (make sure to switch to the correct branch, you want to develop against, as master is very different to the 2.3 branch) and start checking out the plugins there. Maybe start with something simple like the analysis-phonetic plugin, which simply exposes some lucene functionality in Elasticsearch. You can check the plugins/ folder in the source tree for a couple of plugins. There is also a jvm-example that could help as a starting point.