ES 新增数据
新增数据:--命令PUT /spouse/female/5{"name":"lengmeng","age":25,"desc":"actress"}运行结果:{"_index" : "spouse","_type" : "female","_id" : "5","_version" : 1,"result" : "created","_shards" : {"total" : 2,"success
·
新增数据:
--命令
PUT /spouse/female/5
{
"name":"lengmeng",
"age":25,
"desc":"actress"
}
运行结果:
{
"_index" : "spouse",
"_type" : "female",
"_id" : "5",
"_version" : 1,
"result" : "created",
"_shards" : {
"total" : 2,
"successful" : 1,
"failed" : 0
},
"_seq_no" : 5,
"_primary_term" : 1
}
简单查询spouse索引
GET /spouse
查询某个文档ID
GET /spouse/female/1
{
"_index" : "spouse",
"_type" : "female",
"_id" : "1",
"_version" : 1,
"_seq_no" : 0,
"_primary_term" : 1,
"found" : true,
"_source" : {
"name" : "llj",
"age" : 22,
"desc" : "most beauteful"
}
}
更多推荐
已为社区贡献10条内容
所有评论(0)