# Search with nested Fields on multi index

**URL:** <https://discuss.elastic.co/t/search-with-nested-fields-on-multi-index/277403>\
**Category:** Elasticsearch\
**Created:** [June 30, 2021, 4:09am UTC](https://discuss.elastic.co/t/search-with-nested-fields-on-multi-index/277403 "2021-06-30T04:09:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![12345](https://avatars.discourse-cdn.com/v4/letter/1/ec9cab/32.png) [@12345](https://discuss.elastic.co/u/12345)\
**Post date:** [June 30, 2021, 4:09am UTC](https://discuss.elastic.co/t/search-with-nested-fields-on-multi-index/277403/1 "2021-06-30T04:09:09Z")

</div>

I am using ES 7.1.I have my design in such a way each index contains single document type.For example - Suppose I have Order and some products in it. Order data is stored in one index and Products data in other index.

I want to search first 20 orders in ES (want data of both order and products) and display result on page(whole order data along with products) .How I can achieve this?  
Searched for nested fields on multi indexing but cant get success.Please help

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 3, 2021, 5:57pm UTC](https://discuss.elastic.co/t/search-with-nested-fields-on-multi-index/277403/2 "2021-07-03T17:57:28Z")

</div>

> [@12345](#):
>
> I am using ES 7.1

That is quite old. You should really consider upgrading.

> [@12345](#):
>
> I want to search first 20 orders in ES (want data of both order and products) and display result on page(whole order data along with products) .How I can achieve this?

If your data is in different indices I believe you will need to run 2 queries as Elasticsearch does not support joins. You could also perhaps use either parent-child relationships or nested documents to be able to do it in a single query.

---

<div class="post-metadata">

**Author:** ![12345](https://avatars.discourse-cdn.com/v4/letter/1/ec9cab/32.png) [@12345](https://discuss.elastic.co/u/12345)\
**Post date:** [July 5, 2021, 4:04am UTC](https://discuss.elastic.co/t/search-with-nested-fields-on-multi-index/277403/3 "2021-07-05T04:04:36Z")

</div>

Can we use parent child relationship / nested documents across index?

---

<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:** [August 2, 2021, 4:04am UTC](https://discuss.elastic.co/t/search-with-nested-fields-on-multi-index/277403/4 "2021-08-02T04:04:52Z")

</div>

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