geo_point 类型的 elasticsearch 索引字段不允许 PUT WKT 坐标

elasticsearch index field of type geo_point won't allow PUT of WKT coordinates

Elasticsearch(AWS 版本 7.1)在通过 Kibana 控制台将 WKT 数据插入 geo_point 字段时给我一条错误消息。尝试在

的简单索引上执行此操作时会发生这种情况
PUT my-geopoints
{
  "mappings": {
    "properties": {
      "location": {
        "type": "geo_point"
      }
    }
  }
}

来自网站 https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html 或我自己的字段为 geo_point 的索引。

当 运行 在 Kibana 控制台中时:

PUT my-geopoints/_doc/5
{
  "text": "Geopoint as a WKT POINT primitive",
  "location" : "POINT (-71.34 41.12)" 
}

我收到的错误消息是:

{
  "error":{
    "root_cause": [
      {
        "type": "parse_exception",
        "reason": "unsupported symbol [P] in geohash [POINT (-71.34 41.12)]"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "failed to parse field [location] of type [geo_point]",
    "caused_by":{
      "type": "parse_exception",
      "reason": "unsupported symbol [P] in geohash [POINT (-71.34 41.12)]",
      "caused_by": {
        "type": "illegal_argument_exception",
        "reason": "unsupported symbol [P] in geohash [POINT (-71.34 41.12)]"
      }
    }
  },
  "status": 400
}

这发生在将我的数据批量加载到加载 WKT 几何数据的单独索引时。我找不到任何指向任何原因的东西。昨天和今天早上它一直有效,直到我尝试本教程试图弄清楚为什么地理距离教程 (https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-distance-query.html) 不允许我对 geo_shapes 使用与 [=] 相同的索引映射26=]秒。那将是一个单独的问题。

更改映射中的位置类型 "type": "geo_point""type": "geo_shape" 并尝试

我们从 Elasticsearch 7.1 升级到 7.10,它解决了这个特殊问题。