* Sets a raw (xcontent / json) sub addAggregation.
*/
public B subAggregation(Map<String, Object> aggs) {
try {
XContentBuilder builder = XContentFactory.contentBuilder(Requests.CONTENT_TYPE);
builder.map(aggs);
return subAggregation(builder);
} catch (IOException e) {
throw new ElasticsearchGenerationException("Failed to generate [" + aggs + "]", e);
}
}