您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

使用logstash将CSV地理数据作为geo_point类型输入到elasticsearch中

使用logstash将CSV地理数据作为geo_point类型输入到elasticsearch中

问题在于,在elasticsearch输出中您为索引命名,base_map_simple而在模板中该template属性base_map_template,因此在创建新索引时不会应用该模板。该template属性需要以某种方式匹配要创建的索引的名称,以使模板生效。

如果将后者简单地更改为,它将起作用base_map_*,例如:

{
  "template": "base_map_*",             <--- change this
  "order": 1,
  "settings": {
    "index.number_of_shards": 1
  },
  "mappings": {
    "node_points": {
      "properties": {
        "location": {
          "type": "geo_point"
        }
      }
    }
  }
}

确保首先删除当前索引以及模板。

curl -XDELETE localhost:9200/base_map_simple
curl -XDELETE localhost:9200/_template/logstash
其他 2022/1/1 18:13:42 有723人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶