i have below json
attrib is nested property
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.