如何解决Elasticsearch地理空间地图,无法渲染线串
elasticsearch索引包含以下json,仅显示相关元素
"geoLocation": {
"coordinates": [ [ -90.66487121582031,42.49201965332031 ],[ -90.66487884521484,42.49202346801758 ],[ -90.6648941040039,42.492034912109375 ],[ -90.66490936279297,42.49203872680664 ],[ -90.66492462158203,42.492042541503906 ],[ -90.6649398803711,42.49204635620117 ],[ -90.66495513916016,42.49205017089844 ],[ -90.66497039794922,42.4920539855957 ],[ -90.66498565673828,42.492061614990234 ],[ -90.66500854492188,[ -90.66502380371094,42.49207305908203 ],[ -90.6650390625,42.4920654296875 ] ],"type": "linestring"
},
生成映射的模板如下
PUT _template/template_1?include_type_name=true
{
"index_patterns": ["metromind-its-alerts-day2-*"],"settings": {
"number_of_shards": 2
},"mappings": {
"logs": {
"properties": {
"geoLocation": {
"type": "geo_shape"
}
}
}
}
}
生成的映射如下所示
mapping showing the geoLocation type
使用Kibana地图时,它会检测到geo_shape
Kibana Map to render Linestring
请注意,但是不会渲染线串,请提出分辨率
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。