Kibana 4 detects geodata but doesn't display any results on the map

六月ゝ 毕业季﹏ 提交于 2020-01-04 04:12:10

问题


I have created an Elasticsearch index from a data set containing geodata. I have set up mapping for the data. Then I tried to create Kibana visualisation using this data set. Kibana detects the geodata property but finds no result even though there plenty of. Then I ran a test on another data set with different and much simpler layout, and Kibana properly visualised geodata.

Here's the sample that works:

"location": { "lat": 56.290525, "lon": -30.163298 },

and this is its mapping:

"location": {
                  "type": "geo_point",
                  "lat_lon": true,
                  "geohash": true
                 }

And this one doesn't work:

"groupOfLocations": {
                  "@type": "Point",
                  "locationForDisplay": {
                     "lat": 59.21232,
                     "lon": 9.603803
                  }
}

And this is its mapping:

{
... // nested type

"locationForDisplay": {
                        "type": "geo_point",
                        "lat_lon": true,
                        "geohash": true
                     }
...
}

There are only two things that are different between working and non-working versions:

  1. The one that works has a JSON element called "location" while the other one is called "locationForDisplay"

  2. The one that works has a JSON element ("location") as a top level element, while in the other one it's an element in the nested type.

Apart from these two differences (which I believe shouldn't mean anything) I can't find anything else. What can make Kibana fail?


回答1:


Kibana can not work with nested Json, You need to change it to the standard Json.



来源:https://stackoverflow.com/questions/29393819/kibana-4-detects-geodata-but-doesnt-display-any-results-on-the-map

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!