Elasticsearch7 index语法
查询:
Get API | Elasticsearch Guide [7.13] | Elastic
GET index/_doc/_id
举例:
GET my-index-000001/_doc/0
插入和更新:
Update API | Elasticsearch Guide [7.13] | Elastic
_id存在就是更新,否则执行插入操作
PUT /index/_doc/_id
{
"content":"it is cool !"
}
举例:
PUT /event2021-07-09/_doc/SrhAUXoBGoUgLndtHN4d
{
"@timestamp": "2021-08-28T15:13:15.131+0800",
"name": "coderTree",
"hobby":"pingpang-ball"
}
删除:
Delete API | Elasticsearch Guide [7.13] | Elastic
DELETE /index/_doc/1_id
举例:
DELETE /my-index-000001/_doc/1