elasticSearch文档基本操作 POST PUT GET DELETE
1. PUT 添加数据
PUT /gouzi/user/1
{
"name": "小狗子",
"age": 23,
"tags": ["gouzi","keaigou"]
}
2.GET 查询数据
GET /gouzi/user/1
GET /gouzi/user/_search?q=name:w
GET /索引/类型/_search?q=属性:查询条件
3.PUT和POST方式 修改数据
PUT /gouzi/user/1
{
"name": "小狗子111",
"age": 231,
"tags": ["gouzi1","keaigou1"]
}
POST /gouzi/user/1
{
"name": "小狗子22",
"age": 2312,
"tags": ["gouzi12","keaigou12"]
}
4.DELETE 删除数据
DELETE /gouzi/user/1