Hi, is missing value supported for nested aggs? The below example returns class cast exception, but single level on country it works fine. It will return the count of provinces for the missing country.
GET test/test/_search
{
"size": 0,
"aggs": {
"country": {
"terms": {
"field": "country",
"size": 0,
"missing": "NO_COUNTRY"
},
"aggs" :{
"state" :{
"terms": {
"field": "province",
"size": 0,
"missing": "NO_PROVINCE"
}
}
}
}
}
}
Returns
{
"error": {
"root_cause": [
{
"type": "class_cast_exception",
"reason": null
},
{
"type": "class_cast_exception",
"reason": null
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "test",
"node": "aqU92h4pQima7KyVIQZqfQ",
"reason": {
"type": "class_cast_exception",
"reason": null
}
},
{
"shard": 1,
"index": "test",
"node": "JEgLRrxuTYCF9tqq4pVw5w",
"reason": {
"type": "class_cast_exception",
"reason": null
}
}
]
},
"status": 500
}