ElasticSearch Head-Only Plugins
If you search for howtos on elasticsearch plugin development, you will likely find a couple of inroductions to the subject, which go on about Maven, .jar files, XML configuration, and some other details. However, sometimes rather than a true server-side plugin, all you want to do is slap some HTML UI on top of some ES query results. Well, it turns out that ES will happily serve any static content that is present in its plugin/[pluginname]/_site directory. Furthermore, it will serve the index.html file from the _site directory as the default document for the plugin url (http://esserver:9200/_plugin/[pluginname]). This is, in fact, how plugins like the ubiquitous elasticsearch-head plugin work. It is a front-end for ES and does not require server-side interactions.
It's debatable whether a Head-Only piece of code like should be called a plugin, since you can easily build the same functionality entirely externally, served by your own webserver or just deployed as local files. However, it is certainly a handy way to deploy tools, particularly because you can author your ajax calls with relative urls ( "../../someEsIndex") , and don't need to bother with knowing the scheme/host/port of the ES server.
It's debatable whether a Head-Only piece of code like should be called a plugin, since you can easily build the same functionality entirely externally, served by your own webserver or just deployed as local files. However, it is certainly a handy way to deploy tools, particularly because you can author your ajax calls with relative urls ( "../../someEsIndex") , and don't need to bother with knowing the scheme/host/port of the ES server.
Comments