1、查看当前 【索引】 状态
http://localhost:9200/_cat/indices?v
2、设置 log 【type】
PUT http://localhost:9200/core_data
{
"mappings": {
"log": {
"properties": {
"@timestamp": {
"type": "date",
"format": "epoch_second"
},
"log_msg": {
"type": "text",
"index": "true"
}
}
}
}
}
3、删除指定的 【索引】
DELETE http://localhost:9200/core_data*
4、插入一条数据
{"@timestamp": 1520507705, "log_msg": "hahahaha"}