# How can I relate \_Id from diferents Index

**URL:** <https://discuss.elastic.co/t/how-can-i-relate-id-from-diferents-index/134582>\
**Category:** Elasticsearch\
**Created:** [June 5, 2018, 9:51am UTC](https://discuss.elastic.co/t/how-can-i-relate-id-from-diferents-index/134582 "2018-06-05T09:51:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reverse\_Flash\_DC](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Reverse\_Flash\_DC](https://discuss.elastic.co/u/Reverse_Flash_DC)\
**Post date:** [June 5, 2018, 9:51am UTC](https://discuss.elastic.co/t/how-can-i-relate-id-from-diferents-index/134582/1 "2018-06-05T09:51:39Z")

</div>

I can to relate two index by an ID.

How can I do that?

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [June 8, 2018, 3:42pm UTC](https://discuss.elastic.co/t/how-can-i-relate-id-from-diferents-index/134582/2 "2018-06-08T15:42:39Z")

</div>

If you are asking about joins (like in relational database), then they are not supported by elasticsearch. The closest you can get is [terms query](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/query-dsl-terms-query.html#_terms_lookup_twitter_example) with id lookup.

---

<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:** [July 6, 2018, 3:49pm UTC](https://discuss.elastic.co/t/how-can-i-relate-id-from-diferents-index/134582/3 "2018-07-06T15:49:50Z")

</div>

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