Search Multiple Indexes


I am using Elasticsearch 6.7.1 and my data is coming from an application built in an MVC framework. While I understand that it is not possible to duplicate the relational functionality of MVC I would like to try and achieve something similar with Elasticsearch.

So let us say that I have 2 indices which are leads and lead_contacts. I want to be able to search through both the leads and lead_contacts but only return the leads.

I have read and seen suggestions of denormalization being the answer but in my case it is possible for the lead contacts to be indexed very often and would like to do the operations individually on each index.

Thank you in advance, any assistance or direction would be much appreciated.

You can't do joins at search time between indices with elasticsearch.

You can do join at index time (which is denormalisation) . You can use the parent/child feature as well.

Thank you for your prompt response @dadoonet.

if I use the parent/child feature to accomplish this. Would it still be possible to create the parent/child join across the 2 different indexes?

No. See

Thank you @dadoonet I managed to get this working with the join.

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