# Can I join an elasticsearch index with geojson to form one index to use as point to point map?

**URL:** <https://discuss.elastic.co/t/can-i-join-an-elasticsearch-index-with-geojson-to-form-one-index-to-use-as-point-to-point-map/263073>\
**Category:** Kibana\
**Created:** [February 3, 2021, 6:04am UTC](https://discuss.elastic.co/t/can-i-join-an-elasticsearch-index-with-geojson-to-form-one-index-to-use-as-point-to-point-map/263073 "2021-02-03T06:04:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahlatse\_Wiwi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahlatse_wiwi/32/55139_2.png) [@Mahlatse\_Wiwi](https://discuss.elastic.co/u/Mahlatse_Wiwi)\
**Post date:** [February 3, 2021, 6:04am UTC](https://discuss.elastic.co/t/can-i-join-an-elasticsearch-index-with-geojson-to-form-one-index-to-use-as-point-to-point-map/263073/1 "2021-02-03T06:04:53Z")

</div>

I have an index "index\_travels" which has a field "travel\_from" and "travel\_to". These fields are not geofields. However, I have imported a geojson file "Wards" that has a field "wardID" which is the same as "travel\_from" and "travel\_to".

**I want to draw a point to point layer using these two data sources** , but "index\_travels" does not appear in point to point as a usable index for point to point.

Also, when using the layer option: configured Geojson, doing those two joins does not yield the desired results because layer style of lines is for drawing borders along the regions.

How can I go about accomplishing this?

\*\*I want to draw a point to point layer using "index\_travels" and a configured Geojson \*\*

I use Kibana v 7.8.0

---

<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:** [February 3, 2021, 1:36pm UTC](https://discuss.elastic.co/t/can-i-join-an-elasticsearch-index-with-geojson-to-form-one-index-to-use-as-point-to-point-map/263073/2 "2021-02-03T13:36:07Z")

</div>

Joins can not be used to display point-to-point layers.

You could try using the [geo\_match enrich processor](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/geo-match-enrich-policy-type.html) to add geo\_point locations directly into your index\_travels index.

---

<div class="post-metadata">

**Author:** ![Mahlatse\_Wiwi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mahlatse_wiwi/32/55139_2.png) [@Mahlatse\_Wiwi](https://discuss.elastic.co/u/Mahlatse_Wiwi)\
**Post date:** [February 9, 2021, 1:12pm UTC](https://discuss.elastic.co/t/can-i-join-an-elasticsearch-index-with-geojson-to-form-one-index-to-use-as-point-to-point-map/263073/3 "2021-02-09T13:12:48Z")

</div>

Thanks for the response @Nathan_Reese . From the instructions on the geo\_match enrich processor, I see that the two datasets to be joined must be indexed on elasticsearch. And they both have the geolocation field.. But in my dataset the imported geojson file does not appear in index management for being indexed; And my _index\_travels_ does not have a geofield. Should I add the geojson data as I would any other dataset to be indexed in order to accomplish this?

---

<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:** [February 9, 2021, 3:08pm UTC](https://discuss.elastic.co/t/can-i-join-an-elasticsearch-index-with-geojson-to-form-one-index-to-use-as-point-to-point-map/263073/4 "2021-02-09T15:08:12Z")

</div>

Thanks for clarifying. You can use a `match` policy to join by travel\_from and travel\_to and the add a geo\_point for each into your documents. Here is a blog post that provides some details [Introducing the enrich processor for Elasticsearch ingest nodes | Elastic Blog](https://www.elastic.co/blog/introducing-the-enrich-processor-for-elasticsearch-ingest-nodes)

---

<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:** [March 9, 2021, 3:08pm UTC](https://discuss.elastic.co/t/can-i-join-an-elasticsearch-index-with-geojson-to-form-one-index-to-use-as-point-to-point-map/263073/5 "2021-03-09T15:08:18Z")

</div>

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