NOTE: This article is now outdated. Please read Adding a new REST endpoint to elasticsearch (Updated for GA) instead!
This blog post is part of a series which will teach you:
- How to write a plugin for elasticsearch 5.0 using Maven.
- How to add a new REST endpoint plugin to elasticsearch 5.0 (what you are reading now).
- How I wrote the
ingest-banoplugin which will be hopefully released soonish. In this plugin, new REST endpoints have been added.
Imagine that you wish to add a new REST endpoint so you can send requests like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
And you want to get back something like:
1 2 3
Without any parameter:
It should return:
1 2 3
Or get back a list of existing indices and the number of documents for a given type of indices with:
Let’s see how to implement that!