ES 通过curl命令操作,带用户权限
1. 查看索引curl -k https://192.168.1.123:9200/_cat/indices?v --user admin:password2. 删除索引curl -k -XDELETE https://192.168.1.123:9200/index_name?pretty --user admin:password3. 根据条件查询数据curl -k -XPOST https:
1. 查看索引
curl -k https://192.168.1.123:9200/_cat/indices?v --user admin:password
2. 删除索引
curl -k -XDELETE https://192.168.1.123:9200/index_name?pretty --user admin:password
3. 根据条件查询数据
curl -k -XPOST https://192.168.1.123:9200/index_name/_delete_by_query?pretty -d '{"query": {"bool" : { "must": {"match": {"name" : {"query" : "你的名字"}}}}}}' -H "Content-Type: application/json" --user admin:password;
4. 根据条件删除数据
curl -k -XPOST https://192.168.1.100:123/index_name/_delete_by_query?pretty -d '{"query": {"bool" : { "must": {"match": {"name" : {"query" : "你的名字"}}}}}}' -H "Content-Type: application/json" --user admin:password;
5. 更新
curl -XPOST -H "Content-Type:application/json" 'http://192.168.31.215:9201/customer/_update/1?pretty' -d '
{
"doc": {
"name":"你的名字",
"JobS": "Linux",
"Age": 25,
"gender": "man"
}
}'
更多推荐
所有评论(0)