I am trying to combine two fields and aggregate for doc count from the combined field.
Let's say I have two fields as following.
{
"width": 320,
"height": 480
}
I would like to combine these two fields and create a temporarily field called
{
"resolution": "320x480"
}
And then aggregate the document counts based on the "resolution" and sort by it.
I couldn't find any solution for this.
I can only think of creating a new field inside original doc.
Does anyone has a brilliant idea?