//查看/search/article下的数据 "title": "Test1"
GET /search/article/_search
{
"query": {
"match": {
"title": "Test1"
}
}
}
//写入数据
PUT /megacorp/employee/1
{
"first_name" : "John",
"last_name" : "Smith",
"age" : 25,
"about" : "I love to go rock climbing",
"interests" : ["sprots","music"]
}
PUT /megacorp/employee/2
{
"first_name" : "Tom",
"last_name" : "Smith",
"age" : 20,
"about" : "I love to go rock albums",
"interests" : ["sprots"]
}
PUT /megacorp/employee/3
{
"first_name" : "Thomas",
"last_name" : "Fir",
"age" : 23,
"about" : "I love to go rock cabinets",
"interests" : ["music"]
}
//查看/megacorp/employee下的所有数据
GET /megacorp/employee/_search
//删除语句,删除/search/article/1
DELETE /search/article/1
Elasticsearch 熟悉api
最新推荐文章于 2023-11-03 23:06:53 发布