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


(Kristina Plazonic) #1

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):

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.


(Christian Dahlqvist) #2

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. It may also make sense to add this processing at indexing time.


(system) #3

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