REST APIs —— Document APIs —— GET API
https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-get.html#docs-get
Retrieves the specified JSON document from an index.
从索引中检索指定的 JSON 文档。
curl -X GET "localhost:9200/my-index-000001/_doc/0?pretty"
1、Request(请求)
https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-get.html#docs-get-api-request
GET/_doc/<_id> GET < index >/_ doc/< _ id > HEAD /_doc/<_id> HEAD < index >/_ doc/< _ id > GET /_source/<_id> GET < index >/_ source/< _ id > HEAD /_source/<_id> HEAD < index >/_ source/< _ id >
2、Prerequisites(先决条件)
https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-get.html#docs-get-api-prereqs
If the Elasticsearch security features are enabled, you must have the read index privilege for the target index or index alias.
如果启用了 Elasticsearch 安全特性,则必须拥有目标索引或索引别名的读索引特权(https://www.elastic.co/guide/en/elasticsearch/reference/8.8/security-privileges.html#privileges-list-indices)。
标签:index,GET,docs,精讲,get,APIs,doc From: https://www.cnblogs.com/zuoyang/p/17451786.html