json
{
"testpoi": {
"mappings": {
"poi": {
"properties": {
"address": {
"type": "string"
},
"location": {
"properties": {
"lat": {
"type": "double"
},
"lon": {
"type": "double"
}
}
},
"name": {
"type": "string"
}
}
}
}
}
}
shell
curl -XPUT 'http://localhost:9200/testpoi/_mapping/poi' -d '{"poi":{"properties":{"location":{"type":"geo_point"}}}}'
#报错:
# {"error":"MergeMappingException[Merge failed with failures {[Can't merge a non object mapping [location] with an object mapping [location]]}]","status":400}