# Link Between indices (Geojson + data)

**URL:** <https://discuss.elastic.co/t/link-between-indices-geojson-data/317959>\
**Category:** Kibana\
**Tags:** maps\
**Created:** [November 2, 2022, 10:08am UTC](https://discuss.elastic.co/t/link-between-indices-geojson-data/317959 "2022-11-02T10:08:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chloe\_Boissavy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chloe_boissavy/32/104593_2.png) [@Chloe\_Boissavy](https://discuss.elastic.co/u/Chloe_Boissavy)\
**Post date:** [November 2, 2022, 10:08am UTC](https://discuss.elastic.co/t/link-between-indices-geojson-data/317959/1 "2022-11-02T10:08:54Z")

</div>

Hello all,

I am using ELK in version 7.17.2 and I need some help.  
I have 1 Geojson document with the location of my switches (around 80 switches).  
And I have some indices (logstash-DD-MM-YYYY) about these switches.  
In my indices logstash\* and the Geojson document I have a field "Switch=XXX"  
I have created a map with the geojson document.  
And now I would like to have an interactive map, so when in my indices logstash\* I have an error, the switch in the map is red or something like that.  
Is it possible to link these 2 elements ?  
I have tried to create an index patterns "logst\*" with logstash\* elements and geojson elements but it's not working.

Thanks for your help

---

<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:** [November 2, 2022, 3:22pm UTC](https://discuss.elastic.co/t/link-between-indices-geojson-data/317959/2 "2022-11-02T15:22:40Z")

</div>

You can use [term joins](https://www.elastic.co/guide/en/kibana/current/terms-join.html) to visualize your switches by logst\* with errors.

To do this:

- In your map, click "Add layer"
- select "Choropleth" card
- Under " Boundaries source"
  - select "Points, lines, and polygons from Elasticsearch"
  - select your switches index pattern
  - Set "join field" to the field containing the switch id

- Under "Statistics source"
  - select "logst\*" index pattern
  - Set "join field" to the field containing the switch id

- Click "Add layer"
- In the layer editor "Term joins" panel, click the where clause to add a filter to "logst\*" to filter for errors
- In the layer editor "Layer style" panel, under "Fill color", select "Custom color ramp". Add a row to show red when the count is equal to one or more.

 ![Screen Shot 2022-11-02 at 9.21.21 AM](https://us1.discourse-cdn.com/elastic/original/3X/f/d/fd6bad4dc91605840d4a082ef7117769f251dc2d.png)

 ![Screen Shot 2022-11-02 at 9.21.59 AM](https://us1.discourse-cdn.com/elastic/original/3X/e/6/e6b1255f10deef364201596d1acaf45103e72f8f.png)

---

<div class="post-metadata">

**Author:** ![Chloe\_Boissavy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chloe_boissavy/32/104593_2.png) [@Chloe\_Boissavy](https://discuss.elastic.co/u/Chloe_Boissavy)\
**Post date:** [November 4, 2022, 8:54am UTC](https://discuss.elastic.co/t/link-between-indices-geojson-data/317959/3 "2022-11-04T08:54:31Z")

</div>

Thanks a lot !  
It's exactly that !

---

<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:** [December 2, 2022, 8:55am UTC](https://discuss.elastic.co/t/link-between-indices-geojson-data/317959/4 "2022-12-02T08:55:22Z")

</div>

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