1. 删除 test_dev_log索引 (有就删除,没有就直接跳到第二点新建)
删除 id = 1 的数据,操作如下:
url:http://127.0.0.1:9200/index名称/type名称/1 HTTP方法采用DELETE的形式。
2. 重建索引 ,注意选择了 put, 创建索引和mapping都是put
http://192.168.8.183:9200/test_dev_log/
{
"mappings": {
"messages": {
"_all": {
"enabled": false
},
"_ttl": {
"enabled": true,
"default": 432000000
},
"dynamic_templates": [
{
"template_1": {
"mapping": {
"index": "not_analyzed",
"type": "string"
},
"match": "*",
"match_mapping_type": "string"
}
}
],
"properties": {
"11demo定时任务": {
"type": "string",
"index": "not_analyzed"
},
"[线程id": {
"type": "string",
"index": "not_analyzed"
},
"action": {
"type": "string",
"index": "not_analyzed"
},
"appName": {
"type": "string",
"index": "not_analyzed"
},
"application": {
"type": "string",
"index": "not_analyzed"
},
"bank": {
"type": "string",
"index": "not_analyzed"
},
"bankAccName": {
"type": "string",
"index": "not_analyzed"
},
"bankAccNo": {
"type": "string",
"index": "not_analyzed"
},
"bankId": {
"type": "string",
"index": "not_analyzed"
},
"bankName": {
"type": "string",
"index": "not_analyzed"
},
"body": {
"type": "string",
"index": "not_analyzed",
"ignore_above": 256
},
"branch": {
"type": "string",
"index": "not_analyzed"
},
"class": {
"type": "string",
"index": "not_analyzed"
},
"companyId": {
"type": "string",
"index": "not_analyzed"
},
"cost": {
"type": "string",
"index": "not_analyzed"
},
"createTime": {
"type": "string",
"index": "not_analyzed"
},
"createTimeInLong": {
"type": "string",
"index": "not_analyzed"
},
"descrypedPwd": {
"type": "string",
"index": "not_analyzed"
},
"host": {
"type": "string",
"index": "not_analyzed"
},
"id": {
"type": "string",
"index": "not_analyzed"
},
"industryId": {
"type": "string",
"index": "not_analyzed"
},
"jm_timestamp": {
"type": "date",
"format": "strict_date_optional_time||epoch_millis"
},
"key": {
"type": "string",
"index": "not_analyzed"
},
"level": {
"type": "string",
"index": "not_analyzed"
},
"logType": {
"type": "string",
"index": "not_analyzed"
},
"logger": {
"type": "string",
"index": "not_analyzed"
},
"logisticsId": {
"type": "string",
"index": "not_analyzed"
},
"logisticsNo": {
"type": "string",
"index": "not_analyzed"
},
"menuPOList": {
"type": "string",
"index": "not_analyzed"
},
"method": {
"type": "string",
"index": "not_analyzed"
},
"mobile": {
"type": "string",
"index": "not_analyzed"
},
"mobileNo": {
"type": "string",
"index": "not_analyzed"
},
"msgId": {
"type": "string",
"index": "not_analyzed"
},
"myHeader": {
"type": "string",
"index": "not_analyzed"
},
"service": {
"type": "string",
"index": "not_analyzed"
},
"size": {
"type": "string",
"index": "not_analyzed"
},
"sql": {
"type": "string",
"index": "not_analyzed"
},
"statusCode": {
"type": "string",
"index": "not_analyzed"
},
"thread": {
"type": "string",
"index": "not_analyzed"
},
"timestamp": {
"type": "string",
"index": "not_analyzed"
},
"topic": {
"type": "string",
"index": "not_analyzed"
},
"type": {
"type": "string",
"index": "not_analyzed"
},
"ucenterMqTopic": {
"type": "string",
"index": "not_analyzed"
},
"userId": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
}