if (indices.length != 0 && types.length != 0) {
return new BytesRestResponse(OK, builder.endObject());
} else if (indices.length != 0) {
return new BytesRestResponse(channel, new IndexMissingException(new Index(indices[0])));
} else if (types.length != 0) {
return new BytesRestResponse(channel, new TypeMissingException(new Index("_all"), types[0]));
} else {
return new BytesRestResponse(OK, builder.endObject());
}
}