How to use multiple aggregation in elasticsearch. My code works for single aggregation but I want to add another aggregation. I use another aggs for that but its parsing an exception.
{ "aggs": {
"_figures": {
"terms": {
"field": "id"
},
"aggs": {
"field1": {
"stats": {
"field": "field1"
},
"field2":{
"stats":{
"field":"field2"
}
}
}
}
}