curl方式创建elasticsearch的mapping

curl方式创建elasticsearch的mapping

curl -XPUT 'http://192.168.1.105:9200/bank/item2/_mapping' -d '
{
"item2": {
"properties": {
"title": {
"type": "string",
"boost": 2.0,
"index": "analyzed",
"store": "yes",
"term_vector" : "with_positions_offsets"
},
"description": {
"type": "string",
"boost": 1.0,
"index": "analyzed",
"store": "yes",
"term_vector" : "with_positions_offsets"
},
"link": {
"type": "geo_point"
},
"ip": {
"store": true,
"type": "ip"
}
}
}
}'

原文地址:https://www.cnblogs.com/mayidudu/p/5776658.html