您的位置:首页 > 其它

elasticsearch curl命令

2018-06-30 10:17 323 查看
查看集群状态:

curl -XGET 'http://localhost:9200/_cluster/health?pretty'

修改分片分配:

curl -XPUT 'http://192.168.1.101:9200/_cluster/settings' -H 'Content-Type: application/json' -d '{"transient":{"cluster.routing.allocation.enable": "primaries"}}'

创建index:

curl -XPUT 'http://192.168.1.101:9200/mobile_area' -H 'Content-Type: application/json' -d '
"mappings":{
"type":{
"properties":{
"name":{
"type": "keyword"
},
"age":{
"type": "keyword"
}
}
}
}
'
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  curl ElasticSearch