use of io.searchbox.indices.template.PutTemplate in project graylog2-server by Graylog2.
the class IndicesAdapterES6 method ensureIndexTemplate.
@Override
public boolean ensureIndexTemplate(String templateName, Map<String, Object> template) {
final PutTemplate request = new PutTemplate.Builder(uncheckedURLEncode(templateName), template).build();
final JestResult jestResult = JestUtils.execute(jestClient, request, () -> "Unable to create index template " + templateName);
return jestResult.isSucceeded();
}
use of io.searchbox.indices.template.PutTemplate in project graylog2-server by Graylog2.
the class ClientES6 method putTemplate.
@Override
public void putTemplate(String templateName, Map<String, Object> source) {
final PutTemplate templateRequest = new PutTemplate.Builder(templateName, source).build();
executeWithExpectedSuccess(templateRequest, "failed to put template " + templateName);
}
Aggregations