Elastic Search非法纬度值

时间:2018-12-14 02:56:36

标签: elasticsearch geolocation

我已经在弹性搜索中创建了一个索引,并设置了映射等。我一直在很好地创建文档,但是突然之间出现了很多错误,例如“ start_latlng的非法纬度值[-121.638231]”。 / p>

下面,我提供了我尝试创建的一个文档样本,该文档引发异常。但是,如果我将以下内容放在Google地图中,则效果很好。 “ 37.111632,-121.638231”。

我确实读过某个地方的文字,但可能以错误的方式出现,但是如果我在google中这样做,它说那是无效的。

错误消息

{
  "error": {
    "root_cause": [
      {
        "type": "mapper_parsing_exception",
        "reason": "failed to parse"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "failed to parse",
    "caused_by": {
      "type": "illegal_argument_exception",
      "reason": "illegal latitude value [-121.638231] for start_latlng"
    }
  },
  "status": 400
}

我正在创建文档

{
  "id": 20,
  "start_latlng": [
    37.111632,
    -121.638231
  ],
  "end_latlng": [
    37.111822,
    -121.637468
  ]
}

和我的地图

{
  "properties": {
    "start_latlng": {
      "type": "geo_point"
    },
    "end_latlng": {
      "type": "geo_point"
    }
  }
}

0 个答案:

没有答案