How to do some aggregation on elastic search with joining

I have two indices and the result will have a field to join the result sets. After joining, I want to do some count and sum aggregation on the joined result.

Option 1: since join is not supported so using aggregation in each index query would not work either.

Option 2: Get two separate result sets from each index and using java code to join the two lists and then do the aggregation by code.

Could someone please suggest if there is any other better way with Elasticsearch?

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