Hi ,
I have composite query and doing pagination for that need total bucket count, please help=>
my query =>
"size": 0,
"aggs": {
"campoverview": {
"composite": {
"sources": [
{
"date": {
"date_histogram": {
"field": "st",
"format": "yyyy-MM-dd",
"interval": "day",
"order": "desc"
}
}
},
{
"partner": {
"terms": {
"field": "pn"
}
}
},
{
"operator": {
"terms": {
"field": "opn"
}
}
},
{
"key": {
"terms": {
"field": "ke"
}
}
}
]
},
"aggs": {
"view": {
"sum": {
"script": "doc['cst'].value == 1 ? 1 : 0"
}
},
"web": {
"sum": {
"script": "doc['cst'].value == 2 ? 1 : 0"
}
},
"paging": {
"bucket_sort": {
"from": "0",
"size": "10"
}
}
}
}
}