ES的基本操作
查找es的5月索引
curl localhost:9200 /_cat/indices/atreus-202005*?v
删除5月24及以后索引
curl -XDELETE -u elastic:changeme http://localhost:9200/atreus-20200524,atreus-20200531
删除5月后的索引
curl -XDELETE -u elastic:changeme http://localhost:9200/atreus-202006\*
curl -XDELETE -u elastic:changeme http://localhost:9200/atreus-202007\*
curl -XDELETE -u elastic:changeme http://localhost:9200/atreus-202008\*
curl -XDELETE -u elastic:changeme http://localhost:9200/atreus-202009\*
curl -XDELETE -u elastic:changeme http://localhost:9200/atreus-202010\*
curl -XDELETE -u elastic:changeme http://localhost:9200/atreus-202011\*
curl -XDELETE -u elastic:changeme http://localhost:9200/atreus-202012\*
删除21,22年的索引
curl -XDELETE -u elastic:changeme http://localhost:9200/atreus-2021\*
curl -XDELETE -u elastic:changeme http://localhost:9200/atreus-2022\*
还没有评论,来说两句吧...