curl -X GET http://10.1.10.1:9200/_cat/health?v
curl -X GET http://10.1.10.1:9200/_cat/indices?v
curl -X GET http://10.1.10.1:9200/_all
curl -H "Content-Type:application/json" -XPUT http://10.1.10.1:9200/my_new_index/user/1?pretty -d '{"name":"qa","age":"23"}'
curl -X DELETE http://10.1.10.1:9200/my_new_index
curl -X DELETE http://10.1.10.1:9200/kong01
curl -H "Content-Type:application/json" -XPUT http://10.1.10.1:9200/student_test
curl -H "Content-Type:application/json" -XPUT http://10.1.10.1:9200/student -d '{
"settings": {
"number_of_shards": 2,
"number_of_replicas": 2
}
}'
curl -H "Content-Type:application/json" -XPUT http://10.1.10.1:9200/teacher -d '{
"settings": {
"number_of_shards": 2,
"number_of_replicas": 2
},
"mappings":{
"properties":{
"id":{
"type":"integer"
},
"name":{
"type":"keyword"
},
"age":{
"type":"long"
},
"desc":{
"type":"text"
},
"birthday":{
"type":"date"
}
}
}
}'
curl -H "Content-Type:application/json" -XGET http://10.1.10.1:9200/teacher
curl -H "Content-Type:application/json" -XGET http://10.1.10.1:9200/_cat/indices
curl -H "Content-Type:application/json" -XGET http://10.1.10.1:9200/student_test/_count
curl -H "Content-Type:application/json" -XGET http://10.1.10.1:9200/_all/_count
curl -H "Content-Type:application/json" -XGET http://10.1.10.1:9200/_cat/indices?v&h=i,tm&s=tm:desc
curl -H "Content-Type:application/json" -XGET http://10.1.10.1:9200/_cat/indices?v&s=docs.count:desc
curl -H "Content-Type:application/json" -XGET http://10.1.10.1:9200/_cat/indices?v&health=green
curl -X DELETE http://10.1.10.1:9200/kong01
curl -H "Content-Type:application/json" -XPUT http://10.1.10.1:9200/teacher/_settings -d '{
"index":{
"number_of_replicas":4
}
}'
网友评论