2.3.x
创建Mapping
POST /new_test/record/_mapping/
{
"record": {
"properties": {
"analyze_date": {
"format": "yyyy-MM-dd HH:mm:ss",
"type": "date"
},
"upload_status": {
"index": "not_analyzed",
"type": "string"
},
"event_type": {
"index": "not_analyzed",
"type": "string"
}
}
}
}
添加Mapping字段:
PUT /test_index/_mapping/test_type mapping增加字段
{
"properties": {
"proRemark": {
"type": "string",
"index": "not_analyzed"
}
}
}
5.0.x
添加Mapping字段:
POST
test_index/test_type/_mapping
删除type数据:
POST edemo/test/_delete_by_query?conflicts=proceed
{
"query": {
"match_all": {}
}