启动关闭
elasticsearch-6.2.2/bin/elasticsearch & (&为后台运行)
ps -ef | grep elasticsearch
终止运行kill对应进程即可
基础查看维护
检查Elasticsearch是否正在运行:
curl http://localhost:9200/
集群健康 :
curl -X GET "localhost:9200/_cat/health?v"
集群的节点列表:
curl -X GET "localhost:9200/_cat/nodes?v"
查看全部索引:
curl -X GET "localhost:9200/_cat/indices?v"
创建操作
创建一个索引:
curl -X PUT "localhost:9200/customer?pretty"
删除操作
删除一个索引:
curl -XDELETE localhost:9200/{index}