i have below json
attrib is nested property
{
attrib{
color:blue,
categoryId: 1
},
attrib{
color:red,
categoryid: 2}
}
When querying around categoryId : 1 or 2 and get correct result
but while Aggregating on term, I want it to be restricted on categoryId.
How to do that. I tried Nested Aggregation with filter but no luck there.