1.下載curlzip,https://curl.haxx.se/download.html;
2.解壓,在bin文件夾中找到curl.exe,右鍵“以管理員身份運行”,cmd e: 換盤符;出現E:\Work\curl-7.46.0-win64\curl-7.46.0-win64\bin;
3.curl localhost:9200/
查詢集群的健康狀態
curl localhost:9200/_cat/health?v
查詢結點的列表
curl localhost:9200/_cat/nodes?v
查看所有的索引:
curl localhost:9200/_cat/indices?v
創建索引:
curl -XPUT localhost:9200/customer?pretty
設置類型type,\",斜杠加雙引號
curl -XPUT localhost:9200/customer/external/1?pretty -d "{\"name\":\"Fred\"}"
查詢:
curl -XGET localhost:9200/customer/external/1?pretty
刪除索引:
curl -XDELETE localhost:9200/customer?pretty
部分命令不好操作的話,也可以下載cygwin,替代dos操作;或則安裝ElasticSearch Head
搜索 elasticsearch5.0插件 windows
插件
https://www.oschina.net/translate/elasticsearch-getting-started