Skip to content

Instantly share code, notes, and snippets.

@umeshdangat
Created May 18, 2017 18:28
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 umeshdangat/06d4c0a23ee04a1723a5e6c46d637ac7 to your computer and use it in GitHub Desktop.
Save umeshdangat/06d4c0a23ee04a1723a5e6c46d637ac7 to your computer and use it in GitHub Desktop.
deploy ranking module within elasticsearch plugin
public class YelpSearchRestAction extends BaseRestHandler {
@Override
protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient client) {
moduleLoader.loadModule(); //a. invoke re-loading of module.jar
return channel -> channel.sendResponse(new BytesRestResponse(RestStatus.OK, content));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment