elasticsearch 索引,印射
创建索引并指定分片及印射:
curl -XPUT
'192.168.10.253:9200/dcang?pretty' -H 'Content-Type: application/json' -d'
{
"settings": {
"number_of_shards" :1,
"number_of_replicas" : 1
},
"mappings": {
"sys_cgsz_account": {
"properties": {
"id": {
"type":"long",
"boost": 1
},
"name": {
"type":"text",
"analyzer":"ik_max_word",
"search_analyzer":"ik_max_word",
"boost": 1
},
"app_id": {
"type":"text",
"boost": 1
},
"app_secret": {
"type":"text",
"boost": 1
},
"msg_private_key": {
"type":"text",
"boost": 1
},
"msg_public_key": {
"type":"text",
"boost": 1
},
"txt_private_key": {
"type":"text",
"boost": 1
},
"txt_public_key": {
"type":"text",
"boost": 1
},
"pay_merchant_id": {
"type":"text",
"boost": 1
},
"pay_private_key": {
"type":"text",
"boost": 1
},
"pay_public_key": {
"type":"text",
"boost": 1
},
"create_time": {
"type":"date",
"format":"yyyy-MM-dd HH:mm:ss",
"boost": 1
},
"update_time": {
"type":"date",
"format":"yyyy-MM-dd HH:mm:ss",
"boost": 1
},
"created_by": {
"type":"long",
"boost": 1
},
"update_by": {
"type":"long",
"boost": 1
},
"version": {
"type":"long",
"boost": 1
}
}
}
}
}
'
����������a�X�