Last active
December 10, 2015 00:38
-
-
Save katta/4352224 to your computer and use it in GitHub Desktop.
Plugin extension for elastic search
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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