I am wondering how to return specific domain with searchable? For example we have domain A and B. Both domain are searchable and have relationship: A has many B and B belongs to A. Another case A and B have many-to-many relationship.
Now when I search for item, I must always return A item. In my case let say I found matches in B, I need to return all As for each B. Other way around should work as well.
Currently I do a search query is searchable services:
def searchResults = searchableService.search(params.q, params)
Is there a way to get all related A domain for any search results?
Thank you.