MetaData metaData = response.state().metaData();
XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);
builder.startObject();
if (indices.length == 1 && types.size() == 1) {
if (metaData.indices().isEmpty()) {
channel.sendResponse(new XContentThrowableRestResponse(request, new IndexMissingException(new Index(indices[0]))));
return;
}
boolean foundType = false;
IndexMetaData indexMetaData = metaData.iterator().next();