I have a nested aggregation where just some of the sub aggregation fields exist (geo.country). Therefore I'm not getting any data at all, including for main aggregation field (partners).
Is it possible to the preform this sort of aggregation without creating artificial field with null or empty string value for each document which doesn't have this field?
{
"size": 0,
"query": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"gte": "2017-06-04T00:00:00",
"lte": "2017-06-04T23:59:59"
}
}
}
]
}
},
"aggs": {
"partners": {
"terms": {
"field": partners",
"size": 0
},
"aggs": {
"scountry": {
"terms": {
"field": "geo.country",
"size": 0
},
"aggs": {
"impressions": {
"value_count": {
"field": "auction.dsp._id"
}
}
}
}
}
}
}
}