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
本文介绍了Elasticsearch7中使用GET、PUT、DELETE API进行文档查询、插入与更新、删除的基本语法和实例,帮助读者掌握如何与Elasticsearch7索引交互。

被折叠的 条评论
为什么被折叠?



