*/
private XContentBuilder buildResponse(BulkResponse response) throws IOException {
XContentBuilder builder = jsonBuilder();
builder.startObject();
builder.field(Fields.TOOK, response.getTookInMillis());
builder.startArray(Fields.ITEMS);
for (BulkItemResponse itemResponse : response) {
builder.startObject();
builder.startObject(itemResponse.getOpType());
builder.field(Fields._INDEX, itemResponse.getIndex());
builder.field(Fields._TYPE, itemResponse.getType());