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"
}
}
}
}'

posted @ 2016-08-16 15:46  蚂蚁都督  阅读(3880)  评论(0编辑  收藏  举报