# Nested, join multiple indexes

**URL:** <https://discuss.elastic.co/t/nested-join-multiple-indexes/182720>\
**Category:** Elasticsearch\
**Created:** [May 24, 2019, 7:50pm UTC](https://discuss.elastic.co/t/nested-join-multiple-indexes/182720 "2019-05-24T19:50:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JH82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jh82/32/45952_2.png) [@JH82](https://discuss.elastic.co/u/JH82)\
**Post date:** [May 24, 2019, 7:50pm UTC](https://discuss.elastic.co/t/nested-join-multiple-indexes/182720/1 "2019-05-24T19:50:46Z")

</div>

Hello, I've some difficulties to understand how works "join alternative, nested, object type, ..." in ES.  
I've read some docs (like [Nested field type | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/nested.html)) but I can't see how a nested object is mapped to another indice.

> index xxx\_\* - { "key":"value", "ip" : "value"}  
> index abcd - { "ip":"value", "name":"value", "desc":"value"}

I wish to join xxx\_\*.ip with abcd.ip.

Someone can explain me how to do that ?

Thank for your 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:** [May 24, 2019, 8:20pm UTC](https://discuss.elastic.co/t/nested-join-multiple-indexes/182720/2 "2019-05-24T20:20:23Z")

</div>

You can not join across indices in Elasticsearch. You can represent some types of relationships using parent-child mappings or nested documents, but this requires data to be in a single index and is not a join. It is generally recommended to not try an think about your data in relational terms and instead denormalize data into a structure that suits how you want to search or aggregate it.

---

<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:** [June 21, 2019, 8:20pm UTC](https://discuss.elastic.co/t/nested-join-multiple-indexes/182720/3 "2019-06-21T20:20:34Z")

</div>

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