# How to add geo data if index doesn't have it?

**URL:** <https://discuss.elastic.co/t/how-to-add-geo-data-if-index-doesnt-have-it/153250>\
**Category:** Kibana\
**Created:** [October 20, 2018, 1:01pm UTC](https://discuss.elastic.co/t/how-to-add-geo-data-if-index-doesnt-have-it/153250 "2018-10-20T13:01:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pino](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@pino](https://discuss.elastic.co/u/pino)\
**Post date:** [October 20, 2018, 1:01pm UTC](https://discuss.elastic.co/t/how-to-add-geo-data-if-index-doesnt-have-it/153250/1 "2018-10-20T13:01:15Z")

</div>

Please help a complete newbie!

I have an existing elasticsearch index (that's automatically generated from a plugin that populates the index from a database) and I'm trying to visualize some fields geographically (using Kibana's coordinate map). The index has no geolocation data per se. It has a field called "alloc\_node" and I know that there are only handful of "alloc\_node"s present in the dataset, and I have their geographical coordinates.

Data from the index looks like this (from Kibana's discover tab, truncated):

```auto
t _id MV0JkWYBmQ9JhdzgNzwI
t _index slurm
# _score - 
t _type jobcomp
t alloc_node mace

```

e.g. I know that "mace" is located in NYC, lat = 40.73, lon = -73.94. I only have 5 such records where I have to map the node to geo.

Do I have to update the index to visualize this, or can the extra fields be added via a query? How? What would be most efficient? The index is not large for now (but in production could be).

I tried reading the docs, but I'm confused with types being deprecated in ES 6.x+, and the silly things I tried did not work. I feel like this should be such an easy thing to answer for someone with more experience. Any help would be much appreciated.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 21, 2018, 9:44am UTC](https://discuss.elastic.co/t/how-to-add-geo-data-if-index-doesnt-have-it/153250/2 "2018-10-21T09:44:50Z")

</div>

You need to index the location information in order to be able to visualise it efficiently. For data in an index, you can probably update through the [update by query API](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/docs-update-by-query.html). It may also make sense to add this processing at indexing time.

---

<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:** [November 18, 2018, 9:44am UTC](https://discuss.elastic.co/t/how-to-add-geo-data-if-index-doesnt-have-it/153250/3 "2018-11-18T09:44:51Z")

</div>

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