# Search Multiple Indexes

**URL:** <https://discuss.elastic.co/t/search-multiple-indexes/176351>\
**Category:** Elasticsearch\
**Created:** [April 11, 2019, 8:27am UTC](https://discuss.elastic.co/t/search-multiple-indexes/176351 "2019-04-11T08:27:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DC\_Adams](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dc_adams/32/43912_2.png) [@DC\_Adams](https://discuss.elastic.co/u/DC_Adams)\
**Post date:** [April 11, 2019, 8:27am UTC](https://discuss.elastic.co/t/search-multiple-indexes/176351/1 "2019-04-11T08:27:57Z")

</div>

Hello,

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.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 11, 2019, 9:06am UTC](https://discuss.elastic.co/t/search-multiple-indexes/176351/2 "2019-04-11T09:06:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DC\_Adams](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dc_adams/32/43912_2.png) [@DC\_Adams](https://discuss.elastic.co/u/DC_Adams)\
**Post date:** [April 11, 2019, 9:12am UTC](https://discuss.elastic.co/t/search-multiple-indexes/176351/3 "2019-04-11T09:12:09Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 11, 2019, 9:51am UTC](https://discuss.elastic.co/t/search-multiple-indexes/176351/4 "2019-04-11T09:51:05Z")

</div>

No. See [https://www.elastic.co/guide/en/elasticsearch/reference/current/parent-join.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/parent-join.html)

---

<div class="post-metadata">

**Author:** ![DC\_Adams](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dc_adams/32/43912_2.png) [@DC\_Adams](https://discuss.elastic.co/u/DC_Adams)\
**Post date:** [April 12, 2019, 6:51am UTC](https://discuss.elastic.co/t/search-multiple-indexes/176351/5 "2019-04-12T06:51:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 10, 2019, 6:51am UTC](https://discuss.elastic.co/t/search-multiple-indexes/176351/6 "2019-05-10T06:51:30Z")

</div>

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