基于es出现的地理数据插入报错解决方案
这里出的错误是es中常见的geo_shape类型的插入出现:
- 话不多说直接上mapping
curl XPOST
{
"mappings": {
"shape": {
"_all": {
"enabled": false
},
"properties": {
"id": {
"type": "keyword"
},
"geometry": {
"type": "geo_shape",
"tree": "geohash",
"strategy": "recursive"
}
}
}
}
}
-
接下来是一条示例:
-
{ "id": "f2798da7871844dba2fbb90c1083dda7", "geometry": { "type": "polygon", "coordinates": [ [ [ 0.0002769528161925598, 0.0009304545767787741