We have a "globalsearch" index that stores "person", "address", "country" information in one single index:
{
"id":"PER_0001",
"type":"person",
"addressId":"ADDR_001"
},
{
"id":"ADDR_001",
"type":"address",
"countryId":"COUNT_001"
},
{
"id":"COUNT_001",
"type":"country",
"name":"India"
}
Given type=PERSON and id="PER_001", how can I "map" or query so that I can retrieve the country COUNT_001 details?