I would like to make query that like 'sql having' in ES java api.
select * from table group by oid having count(1) > 10
Here is I made but cannot add filter method.
.aggregation(
AggregationBuilders.terms( "aggs").field( "oid").filter... // cannot add filter method
Should I use .script for this?