1:curl -X GET "127.0.0.1:9200/_cat/health?v" 健康检查
2:curl -X GET "127.0.0.1:9200/_cat/nodes?v" 集群节点查看
3:curl -X GET "127.0.0.1:9200/_cat/indices?v" 数据库查看
4:curl -X PUT "127.0.0.1:9200/log-test-0515" 新建数据库
5:curl -X PUT "127.0.0.1:9200/gyl-test/_doc/1?pretty" -H 'Content-type: application/json' -d'{"name": "abcd"}' 新增数据
6:curl -X GET "127.0.0.1:9200/gyl-test/_doc/1?pretty" 查看数据库中的数据
7:curl -X DELETE "127.0.0.1:9200/gyl-test/_doc/1?pretty" 删除数据
8: curl -X POST "127.0.0.1:9200/gyl-test/_doc/1?pretty" -H 'Content-type: application/json' -d'{"name": "abcd", "age": 40}' 更新数据
(返回值里有个状态,已有为update,没有为create)
9: curl -X GET "127.0.0.1:9200/gyl-test/_search?pretty" -H 'Content-type: application/json' -d'{ "query": { "match_all": {}}, "size": 10}' 根据条件查询
10:elasticdump --input http://172.16.100.85:9200/emotibot-sessions-2019-06-17 --output ./emotibot-records-2019-06-17.json --type=mapping:备份:yum install elasticdump -y