Skip to content

Instantly share code, notes, and snippets.

@katta
Last active December 10, 2015 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katta/4352224 to your computer and use it in GitHub Desktop.
Save katta/4352224 to your computer and use it in GitHub Desktop.
Plugin extension for elastic search
package org.katta.es.plugin.http;
import org.katta.es.http.RestRegisterAction;
import org.elasticsearch.plugins.AbstractPlugin;
import org.elasticsearch.rest.RestModule;
public class CustomRestHandlerPlugin extends AbstractPlugin {
@Override
public String name() {
return "custom-http-handler";
}
@Override
public String description() {
return "Registers custom REST http handlers";
}
/**
* This method will be invoked by the elastic search's
* plugin module when this plugin is identified.
*/
public void onModule(RestModule module) {
module.addRestAction(RestRegisterAction.class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment