# How to relate fields of two chilld index into a pattern index

**URL:** <https://discuss.elastic.co/t/how-to-relate-fields-of-two-chilld-index-into-a-pattern-index/44150>\
**Category:** Kibana\
**Created:** [March 11, 2016, 12:41pm UTC](https://discuss.elastic.co/t/how-to-relate-fields-of-two-chilld-index-into-a-pattern-index/44150 "2016-03-11T12:41:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ikerena](https://avatars.discourse-cdn.com/v4/letter/i/838e76/32.png) [@ikerena](https://discuss.elastic.co/u/ikerena)\
**Post date:** [March 11, 2016, 12:41pm UTC](https://discuss.elastic.co/t/how-to-relate-fields-of-two-chilld-index-into-a-pattern-index/44150/1 "2016-03-11T12:41:09Z")

</div>

Hi, i have two index, in one i have an inventory, in the other i have infections per host. In the inventory i have all the hosts with the department it belows for example, and in the other i have all infections and the host which are they. I want to do a graphic with the percentage of infections per department, but i dont know how to count all the times a host was infected relate with the department it belows and get the percentage. i dont know if i explain it well..

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [March 11, 2016, 10:03pm UTC](https://discuss.elastic.co/t/how-to-relate-fields-of-two-chilld-index-into-a-pattern-index/44150/2 "2016-03-11T22:03:19Z")

</div>

It sounds like you essentially want to do a join on the host between the two indices. Unfortunately Elasticsearch doesn't support joins, but you still have options.

The easiest and most common way to handle this scenario is to denormalize your data. You could index documents with host, infection, and department data all bundled together. This way, elasticsearch could easily bucket the documents based on department, and Kibana could visualize it.

---

<div class="post-metadata">

**Author:** ![pkunico](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@pkunico](https://discuss.elastic.co/u/pkunico)\
**Post date:** [March 31, 2016, 3:29am UTC](https://discuss.elastic.co/t/how-to-relate-fields-of-two-chilld-index-into-a-pattern-index/44150/3 "2016-03-31T03:29:29Z")

</div>

Kibi can do this,see [http://siren.solutions/kibi/](http://siren.solutions/kibi/)

---

<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, 2017, 1:57pm UTC](https://discuss.elastic.co/t/how-to-relate-fields-of-two-chilld-index-into-a-pattern-index/44150/4 "2017-07-06T13:57:21Z")

</div>


