JOIN 5 documents with 1 foreign key

Hi,

How to join 5 documents using 1 foreign key?

Example:

document 1 : { “id”: “master_controller”, “type”: “masterData”, etc…}
document 2: {“id”: “sample1”, “masterId”: “master_controller”, etc…}
document 3: {“id”: “sample2”, “masterId”: “master_controller”, etc…}
document 4: {“id”: “sample3”, “masterId”: “master_controller”, etc…}
document 5: {“id”: “sample4”, “masterId”: “master_controller”, etc…}

I want to join those 5 documents in 1 query using the field masterId

We are currently using coubhase server 5.0

Any help will be appreciated, thank you!