Kibana 4检测地理数据,但不会在地图上显示任何结果 [英] Kibana 4 detects geodata but doesn't display any results on the map
问题描述
我从包含地理数据的数据集创建了Elasticsearch索引。我已经建立了数据映射。然后我尝试使用这个数据集创建Kibana可视化。 Kibana检测到地理数据属性,但即使有足够的数据也没有找到结果。然后,我用另一个更简单的布局对另一个数据集进行了测试,并且Kibana正确地显示了地理数据。
以下是可用的示例:
<位置>:{
lat:56.290525,
lon:-30.163298
},
这是它的映射:
位置:{
type:geo_point,
lat_lon:true,
geohash:true
}
而这个不起作用:
groupOfLocations:{
@type:Point,
locationForDisplay:{
lat:59.21232,
lon:9.603803
}
}
这是它的映射:
{
... // ne sted类型
locationForDisplay:{
type:geo_point,
lat_lon:true,
geohash:true
}
...
}
只有两样东西是不同的在工作和非工作版本之间:
工作的人有一个叫做location的JSON元素,而
另一个名为locationForDisplay的元素
工作的元素有一个JSON元素(location)作为顶级
元素,而另一个是嵌套类型的元素。
除了这两个区别之外(我认为不应该这样做) t意味着什么)我找不到其他东西。什么可以使Kibana失败?
解决方案Kibana无法使用嵌套Json,
您需要将其更改为标准Json。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:
The one that works has a JSON element called "location" while the other one is called "locationForDisplay"
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?
解决方案Kibana can not work with nested Json, You need to change it to the standard Json.
这篇关于Kibana 4检测地理数据,但不会在地图上显示任何结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!