1、查詢當前所有的索引
#curl 'localhost:9200/_cat/indices?v'
2、查看集群健康狀態
#curl 'localhost:9200/_cat/health?v'
綠色表示一切正常, 黃色表示所有的數據可用但是部分副本還沒有分配,紅色表示部分數據因為某些原因不可用
3、產看node情況
#curl 'localhost:9200/_cat/nodes?v'
4、創建索引
#curl -XPUT 'localhost:9200/customer?pretty'
5、刪除某個索引
#curl -XDELETE 'localhost:9200/customer?pretty'
刪除多個索引
#curl -XDELETE 'localhost:9200/customer-*?pretty'
#curl -XDELETE 'localhost:9200/customer,customer2?pretty'
6、索引的增刪改查有一個類似的格式,總結如下:
curl -X<REST Verb> <Node>:<Port>/<Index>/<Type>/<ID>
<REST Verb>:REST風格的語法謂詞
<Node>:節點ip
<port>:節點端口號,默認9200
<Index>:索引名
<Type>:索引類型
<ID>:操作對象的ID號
