ES 练习

curl -XPUT http://localhost:9200/customer?pretty
{
"acknowledged" : true,
"shards_acknowledged" : true,
"index" : "customer"
}

 

curl -H "Content-Type: application/json" -XPUT 'localhost:9200/customer/external/1?pretty' -d '

{
"gwyy": "John Doe"

}'
{
"_index" : "customer",
"_type" : "external",
"_id" : "1",
"_version" : 1,
"result" : "created",
"_shards" : {
"total" : 2,
"successful" : 1,
"failed" : 0
},
"_seq_no" : 0,
"_primary_term" : 1
}

 

 

curl -XGET http://localhost:9200/customer/external/1?pretty#
{
"_index" : "customer",
"_type" : "external",
"_id" : "1",
"_version" : 1,
"found" : true,
"_source" : {
"gwyy" : "John Doe"
}
}

 

posted @ 2018-09-05 15:03  Hedy_lqq  阅读(298)  评论(0编辑  收藏  举报