【发布时间】:2015-05-19 19:37:30
【问题描述】:
我可以使用一个纬度/经度变量数组,并将其映射到 geo_point 类型。
这是我当前的映射:
{
"zoek": {
"mappings": {
"geo": {
"properties": {
"country": {
"type": "string"
},
"geonameid": {
"type": "string"
},
"locatie": {
"type": "double"
},
"name": {
"type": "string"
}
}
}
}
}
}
"locate" 指的是一个由两个 double 组成的数组。 [纬度,经度]。
我想将此映射到 geo_point 变量以执行地理距离查询。
所以我尝试了这个:
PUT /zoek/geo/_mapping
{
"geo" : {
"properties" : {
"locatie" : {"type" : "geo_point" }
}
}
}
得到了这个错误:
{
"error": "MergeMappingException[Merge failed with failures {[mapper [locatie] of different type, current_type [double], merged_type [geo_point]]}]",
“状态”:400 }
有什么建议吗?
你好,
达格玛。
【问题讨论】:
标签: elasticsearch