Elasticsearch join query

I have two indices. One indices "indications" which have some set of values.
Other is "projects". In this indices i will add indications value like " indication = oncology".
Now i want to show all indications. Which i can do using terms aggregations. But my issue is that i also want to show count of project in which that indication is used .
So for that i need to write join query .
Can anyone help me to resolve issue.
Result should
Example:
[{name:"onclogogy",projectCount:"12"}]

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