# Multiple Term Join in Elastic Maps

**URL:** <https://discuss.elastic.co/t/multiple-term-join-in-elastic-maps/227550>\
**Category:** Kibana\
**Created:** [April 10, 2020, 7:02pm UTC](https://discuss.elastic.co/t/multiple-term-join-in-elastic-maps/227550 "2020-04-10T19:02:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bustencio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bustencio/32/67857_2.png) [@Bustencio](https://discuss.elastic.co/u/Bustencio)\
**Post date:** [April 10, 2020, 7:02pm UTC](https://discuss.elastic.co/t/multiple-term-join-in-elastic-maps/227550/1 "2020-04-10T19:02:14Z")

</div>

I have a question regarding usage of multiple term join within a layer of Elastic Maps.

I have an index that stores the documents with geo\_point location and some static values and other index with data that updates every 5 minutes. That second index gathers parameters of a network (cpu load, traffic outbound, traffic inbound...) but each parameter is stored as a unique document, I use 2 fields (parameter and value) to differentiate them.

My issue comes when using multiple term joins with filter for each parameter within a layer of the map, I'm capable of retrieving each value correctly if I use different aggregations for each parameter (average of value for parameter 1 and maximum value for parameter 2) but I can't use the same aggregation (average, for example) for both or I get the same value even though each layer is filtered and the values are completely different.

I can provide any additional information if it helps.

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [April 10, 2020, 7:34pm UTC](https://discuss.elastic.co/t/multiple-term-join-in-elastic-maps/227550/2 "2020-04-10T19:34:05Z")

</div>

> I can provide any additional information if it helps.

Could you please provide some additional information. It would be great to know

1. index mappings for each index
2. sample document for each index
3. terms join configurations

---

<div class="post-metadata">

**Author:** ![Bustencio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bustencio/32/67857_2.png) [@Bustencio](https://discuss.elastic.co/u/Bustencio)\
**Post date:** [April 10, 2020, 7:52pm UTC](https://discuss.elastic.co/t/multiple-term-join-in-elastic-maps/227550/3 "2020-04-10T19:52:34Z")

</div>

I forgot to mention that I'm using version 7.6.2.

Here's everything:

Mappings  
-Mapping Index 1

 ![index1](https://us1.discourse-cdn.com/elastic/original/3X/2/5/2598e6c7dcf9544d6bb39f6cf17d8d908a5385b6.png)

-Mapping Index 2

 ![index2](https://us1.discourse-cdn.com/elastic/original/3X/a/8/a85c253bb498299f5ac62c0c0a65e5e5bea84091.png)

Sample documents:  
-Sample Index 1:

 ![sample1](https://us1.discourse-cdn.com/elastic/original/3X/1/b/1bd064a5e3bf342a5cb7442d49737acc3c3d9bfe.png)

-Sample Index 2:

 ![sample2](https://us1.discourse-cdn.com/elastic/original/3X/f/1/f13c066fe4a00110cb15e7e3e5ff1c59c64376c7.png)

Term Join config:

 ![termJoinConfig](https://us1.discourse-cdn.com/elastic/original/3X/d/5/d50ba05743be910a75d97fd7d350daf1b5df8333.png)

Thank you!

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [April 10, 2020, 8:25pm UTC](https://discuss.elastic.co/t/multiple-term-join-in-elastic-maps/227550/4 "2020-04-10T20:25:06Z")

</div>

Thanks for all of the details, this is a really neat use case.

Unfortunately, there is a bug where terms joins with the same `metric`, `field`, and `index pattern` have a naming collision. This is why the values are the same, both metrics are writing to the same feature property.

I have opened [https://github.com/elastic/kibana/issues/63287](https://github.com/elastic/kibana/issues/63287) to track.

---

<div class="post-metadata">

**Author:** ![Bustencio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bustencio/32/67857_2.png) [@Bustencio](https://discuss.elastic.co/u/Bustencio)\
**Post date:** [April 10, 2020, 8:30pm UTC](https://discuss.elastic.co/t/multiple-term-join-in-elastic-maps/227550/5 "2020-04-10T20:30:38Z")

</div>

Thank you so much, I'll keep up with the github issue for updates !

---

<div class="post-metadata">

**Author:** ![Bustencio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bustencio/32/67857_2.png) [@Bustencio](https://discuss.elastic.co/u/Bustencio)\
**Post date:** [April 17, 2020, 9:57am UTC](https://discuss.elastic.co/t/multiple-term-join-in-elastic-maps/227550/6 "2020-04-17T09:57:04Z")

</div>

Just saw that the issue got fixed but just to be clear, which versions will this fix affect ? I believe the merge mentioned [7.x] ?

Thanks anyways !

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [April 17, 2020, 1:06pm UTC](https://discuss.elastic.co/t/multiple-term-join-in-elastic-maps/227550/7 "2020-04-17T13:06:39Z")

</div>

The fix will be in 7.8 release.

---

<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 15, 2020, 1:06pm UTC](https://discuss.elastic.co/t/multiple-term-join-in-elastic-maps/227550/8 "2020-05-15T13:06:47Z")

</div>

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