Elasticsearch 新增字段,elasticsearch字段
Elasticsearch 6.3版本下新增字段
如:给索引index的类型type新增字段name:
POST index/type/_mapping
{
"properties": {
"name":{
"type":"keyword",
"doc_values":false,
"norms": false
}
}
}注:也可以用PUT。
在嵌套节点下面新增字段,mapping正常写:
PUT index/type/_mapping
{
"properties": {
"channelTradeNo": {
"type": "keyword",
"norms": false,
"doc_values": false
},
"orderDetails": {
"type": "nested",
"properties": {
"rightsStatus": {
"type": "keyword",
"norms": false,
"doc_values": false
},
"rightsCurrTime": {
"type": "keyword",
"norms": false,
"doc_values": false
},
"rightsEndTime": {
"type": "keyword",
"norms": false,
"doc_values": false
}
}
}
}
}
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。