use of org.graylog.shaded.elasticsearch7.org.elasticsearch.client.indices.PutIndexTemplateRequest in project graylog2-server by Graylog2.
the class ClientES7 method putTemplate.
@Override
public void putTemplate(String templateName, Map<String, Object> source) {
final PutIndexTemplateRequest request = new PutIndexTemplateRequest(templateName).source(source);
client.execute((c, requestOptions) -> c.indices().putTemplate(request, requestOptions), "Unable to put template " + templateName);
}
use of org.graylog.shaded.elasticsearch7.org.elasticsearch.client.indices.PutIndexTemplateRequest in project graylog2-server by Graylog2.
the class IndicesAdapterES7 method ensureIndexTemplate.
@Override
public boolean ensureIndexTemplate(String templateName, Map<String, Object> template) {
final PutIndexTemplateRequest request = new PutIndexTemplateRequest(templateName).source(template);
final AcknowledgedResponse result = client.execute((c, requestOptions) -> c.indices().putTemplate(request, requestOptions), "Unable to create index template " + templateName);
return result.isAcknowledged();
}
Aggregations