sBuilder.put("gateway.type", "none");
Settings settings = sBuilder.build();
final String pluginPath = this.getClass().getResource("/elasticsearch-wordending-tokenfilter-0.0.1.zip").toExternalForm();
PluginManager pluginManager = new PluginManager(new Environment(settings), pluginPath, PluginManager.OutputMode.VERBOSE, new TimeValue(30000));
try {
pluginManager.downloadAndExtract("ybon/elasticsearch-wordending-tokenfilter/0.0.1");
} catch(IOException e) {
log.debug("could not install ybon/elasticsearch-wordending-tokenfilter/0.0.1", e);
}
if(!test) {
pluginManager = new PluginManager(new Environment(settings), null, PluginManager.OutputMode.VERBOSE, new TimeValue(30000));
for(String pluginName : new String[]{"mobz/elasticsearch-head", "polyfractal/elasticsearch-inquisitor", "elasticsearch/marvel/latest"}) {
try {
pluginManager.downloadAndExtract(pluginName);
} catch(IOException e) {
}
}
}