本文主要是介绍Elasticsearch7 index语法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
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 index语法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!