use of co.elastic.clients.elasticsearch.core.DeleteRequest in project syncope by apache.
the class ElasticsearchIndexManager method after.
@TransactionalEventListener
public void after(final AnyDeletedEvent event) throws IOException {
LOG.debug("About to delete index for {}[{}]", event.getAnyTypeKind(), event.getAnyKey());
DeleteRequest request = new DeleteRequest.Builder().index(ElasticsearchUtils.getContextDomainName(AuthContextUtils.getDomain(), event.getAnyTypeKind())).id(event.getAnyKey()).build();
DeleteResponse response = client.delete(request);
LOG.debug("Index successfully deleted for {}[{}]: {}", event.getAnyTypeKind(), event.getAnyKey(), response);
}
Aggregations