Let's say I have a Rails model called 'Company'. The company :has_many employees. Each employee has a name.
I want to perform an elasticsearch on the Company model to look for all the employees that match a specific query on their 'name' attribute. I want to provide the user with such popup: "[Employee name] works for [Company name]".
In order to be able to do so, I need to render an ES result(JSON) with both the Employee model and the Company he belongs to.
Is it possible to achieve in ES? I know how to search a single model, but have never tried this scenario.