I am trying to do simple aggregation in elastic search using an array my query is as follows
{
"size":0,
"aggs":{
"byTags":{
"terms": {
"field": "tags"
}
}
}
}
this works fine but there is possibility of tags array being empty. If it is empty I want all the documents with empty array value for tags grouped together under the group "unclassified" how do I proceed thanks in advance.