elasticsearch query of group by -
i want result top n data every group after group & sort. need list of that.
like mysql query:
select a.person, a.group, a.age person (select count(*) person b b.group = a.group , b.age >= a.age) <= 2 order a.group asc, a.age desc
can guys me? thx lot.
try nested aggregation , in aggregation can sort also. check out :- sorting after aggregation in elasticsearch
Comments
Post a Comment