首页 文章

Kibana不会在瓷砖 Map 上显示结果

提问于
浏览
1

我有大约3300个填充了geo_point类型字段的文档 . 当我尝试在瓷砖 Map 上可视化我的文档时,kibana说“没有找到结果” .

我已经尝试将坐标设置为: - 字符串中的geohash - [lon,lat]数组 - 具有“lat”和“lon”属性的对象 - 字符串“lat,lon”

根据ES docs,允许所有这些设置geo_point的方法 . Kibana将此字段检测为geo_point(字段名称旁边有一个地球图标),但瓷砖 Map 上没有任何内容 .

我怎么了?

我正在使用Kibana 4.2,elasticsearch 2.0.0

2 回答

  • 2

    我已经成功了 .

    之所以发生这种情况,是因为我在字段内部使用了“type”:“嵌套”参数 .

    我把这个外场改为“动态”:“真实”,现在我可以想象我的位置了!

  • 0

    通过从映射中删除“type”:“嵌套”,我能够拥有嵌套的geo_point . 没有“动态”:需要“真实” . 我的映射看起来像这样:

    "mappings": {
            "_default_": {
                "_all": {
                    "enabled": true
                },
                "_ttl": {
                    "enabled": true,
                    "default": "12m"
                },
                "dynamic_templates": [{
                    "string_fields": {
                        "match": "*",
                        "match_mapping_type": "string",
                        "mapping": {
                            "type": "string",
                            "index": "analyzed",
                            "omit_norms": true,
                            "fields": {
                                "raw": {
                                    "type": "string",
                                    "index": "not_analyzed",
                                    "ignore_above": 256
                                }
                            }
                        }
                    }
                }],
                "properties": {
                    "@version": {
                        "type": "string",
                        "index": "not_analyzed"
                    },
                    "user_data": {
                        "properties": {
                            "user_geolocation": {
                                "properties": {
                                    "location": {
                                        "type": "geo_point"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    

相关问题