Elasticsearch grandchild aggregation

I have the following data model hierarchy: League cups -> teams -> players. League cup is the parent of teams and team is parent of players. League cup model has an attribute called country. I'm trying to write an aggregation to get list of players, and for each player get the countries he has played the league cups in. I'm having trouble writing the query. Any help is appreciated.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.