use of co.elastic.clients.elasticsearch.core.bulk.BulkResponseItem in project core-ng-project by neowu.
the class ElasticSearchTypeImpl method validate.
private void validate(BulkResponse response) {
if (!response.errors())
return;
var builder = new CodeBuilder();
builder.append("bulk operation failed, errors=[\n");
for (BulkResponseItem item : response.items()) {
ErrorCause error = item.error();
if (error != null) {
builder.append("id={}, error={}, stackTrace={}\n", item.id(), error.reason(), error.stackTrace());
}
}
builder.append("]");
throw new SearchException(builder.build());
}
Aggregations