ES基本操作
curl -XDELETE http://127.0.0.1:9200/my_index
curl -XPUT http://127.0.0.1:9110/my_index/_settings?preserve_existing=true -H 'Content-Type: application/json' -d' {"max_result_window": "2000000000"}'
1.查看es状态
get http://127.0.0.1:9200/_cat/health
红色表示数据不可用,黄色表示数据可用,部分副本没有分配,绿色表示一切正常
2.查看所有索引
get http://127.0.0.1:9200/_cat/indices?v'get
3.删除某个索引
delete http://127.0.0.1:9200/(索引名)
delete http://127.0.0.1:9200/my_index 删除名为my_index的索引
4.从索引查询数据
get http://127.0.0.1:9200/my_index/_search 从名为my_index的索引中查询所有数据