增加索引 利用postMan工具发送restfulAPI添加索引库 请求方式为put代表添加 创建索引index时映射mapping 请求URL: 使用put发送http://localhost:9200/blog1 { "mappings ...
删除指定索引 curl XDELETE u elastic:changeme http: localhost: acc apply . . acknowledged :true 删除多个指定索引,中间用逗号隔开 curl XDELETE u elastic:changeme http: localhost: acc apply . . ,acc apply . . 模糊匹配删除 curl XDE ...
2018-08-17 15:34 0 18528 推荐指数:
增加索引 利用postMan工具发送restfulAPI添加索引库 请求方式为put代表添加 创建索引index时映射mapping 请求URL: 使用put发送http://localhost:9200/blog1 { "mappings ...
参考文档:https://www.cnblogs.com/Dev0ps/p/9493576.html elasticsearch使用时间久了会产生大量索引占用磁盘空间,可以删除索引来释放 查看当前所有索引 curl '192.168.1.4:9200/_cat ...
1.查询索引 View Code //查看到有很多 zipkin日志索引 获取当前索引 查看具体一个 2.删除索引 使用通配符,删除所有的索引 3.设置定时删除 ...
从去年搭建了日志系统后,就没有去管它了,最近发现大半年各种日志的index也蛮多的,就想着写个脚本定时清理一下,把一些太久的日志清理掉。 脚本思路:通过获取index的尾部时间与我们设定的过期时间进行对比,如果是属于过期时间那么就进行删除,并写入日志。如果不是则不进行处理。 完整的脚本:(今天 ...
删除单个: DELETE /indexcurl -XDELETE 'http://192.169.1.666:9200/index 你也可以这样删除多个索引: DELETE /index_one,index_two curl -XDELETE 'http://192.169.1.666 ...
#!/bin/bashfind /data/elasticsearch/data/pro-kz-log/nodes/0/indices/ -type d -mtime +7 | awk -F"/" '{print $9}' | grep -v kibana | uniq > /home ...
一、Elasticsearch 索引(新建)一个文档的命令: curl XPUT ' http://localhost:9200/test_es_order_index/test_es_order_type/1 ' -d ' { "id": 5, "name": "test555 ...