ElasticSearch 创建、删除索引
创建索引:
PUT http://IP:Port/mytest-statistics
{
"aliases": {},
"mappings": {
"doc": {
"dynamic": "false",
"_all": {
"enabled": false
},
"properties": {
"count": {
"type": "long"
},
"day": {
"type": "keyword"
},
"cameraId": {
"type": "keyword"
}
}
}
},
"settings": {
"index": {
"search": {
"slowlog": {
"level": "trace",
"threshold": {
"fetch": {
"warn": "1s",
"trace": "200ms",
"debug": "500ms",
"info": "800ms"
},
"query": {
"warn": "10s",
"trace": "500ms",
"debug": "2s",
"info": "5s"
}
}
}
},
"number_of_shards": "24",
"number_of_replicas": "1",
"max_result_window": "100000000"
}
}
}
删除索引:
DELETE http://IP:Port/mytest-statistics