use of org.graylog.shaded.elasticsearch7.org.elasticsearch.action.support.master.AcknowledgedResponse in project graylog2-server by Graylog2.
the class V20200730000000_AddGl2MessageIdFieldAliasForEventsES7IT method createIndicesWithIdMapping.
private void createIndicesWithIdMapping(String... indices) {
for (String index : indices) {
client().createIndex(index);
}
final PutMappingRequest putMappingRequest = new PutMappingRequest(indices).source(idMapping());
final AcknowledgedResponse acknowledgedResponse = elasticsearch.elasticsearchClient().execute((c, opt) -> c.indices().putMapping(putMappingRequest, opt));
if (!acknowledgedResponse.isAcknowledged()) {
throw new RuntimeException("Failed to add 'id' mapping for indices " + Arrays.toString(indices));
}
}
Aggregations