【发布时间】:2021-10-07 05:06:06
【问题描述】:
当通过 Kibana 控制台将 WKT 数据插入 geo_point 字段时,Elasticsearch(AWS 版本 7.1)给了我一条错误消息。尝试在
的简单索引上执行此操作时会发生这种情况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 使用与 geo_points 相同的索引映射。这本身就是一个单独的问题。
【问题讨论】: