(一)GET方式访问
核心就是curl ip:port
案例:
[root@administrator bin]# curl localhost:9200
{
"name" : "administrator",
"cluster_name" : "spring-boot",
"cluster_uuid" : "EZJYVN7TRPOSMlr49YPzsA",
"version" : {
"number" : "5.5.1",
"build_hash" : "19c13d0",
"build_date" : "2017-07-18T20:44:24.823Z",
"build_snapshot" : false,
"lucene_version" : "6.6.0"
},
"tagline" : "You Know, for Search"
}
(二)其他访问方式
核心:curl -X方式 'ip:port?参数'
比如:PUT方式访问
[root@administrator bin]# curl -XPUT 'http://127.0.0.1:9200/segmentfault?pretty'
{
"acknowledged" : true,
"shards_acknowledged" : true
}