Creating a custom REST action

Let's start the journey of extending Elasticsearch by creating a custom REST action. We've chosen this as the first extension, because we wanted to take the simplest approach as the introduction to extending Elasticsearch.


We assume that you already have a Java project created and that you are using Maven, just like we did in the Creating the Apache Maven project structure section at the beginning of this chapter. If you would like to use an already created and working example and start from there, please look at the code for Chapter 11, Developing Elasticsearch Plugins that is available with the book.

The assumptions

In order to illustrate how to develop a custom REST action, we need to have an idea of how it should ...

Get Mastering Elasticsearch 5.x - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.