首页 > 其他分享 >Elasticsearch专题精讲—— REST APIs —— Document APIs —— GET API

Elasticsearch专题精讲—— REST APIs —— Document APIs —— GET API

时间:2023-06-02 15:14:28浏览次数:40  
标签:index GET docs 精讲 get APIs doc

 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

相关文章

  • mysql一键生成APIs应用
     Go&Rust......
  • docker apt-get update失败问题解决
    一、问题描述docker容器相当于linux系统的精简版,内部很多指令是无法直接使用的,例如vim指令,为了使用vim指令,我们需要进入容器内部进行安装,安装步骤为:apt-getupdateapt-getinstallvim很多时候我们发现安装会失败,这里是由于下载源问题。二、解决方案1.进入宿主机下cd/e......
  • 使用you-get下载网站视频
    使用you-get下载网站视频you-get是一个跨平台命令行视频、音频与图像下载工具,支持常用的各种多媒体网站。文章目录使用you-get下载网站视频一、安装先决条件1.pip安装2.通过[Antigen](https://github.com/zsh-users/antigen)安装(适用于Zsh用户)3.GitHub下载4.GitHub克隆5.升级二......
  • mapState 与 mapGetters
    1.mapState方法:用于映射state中的数据为计算属性computed:{...mapState({sum:'sum',school:'school'}),...mapState(['sum','school']),}2.mapGetters方法:用于映射getters中的数据为计算属性computed:{...mapGetters({bigSum:......
  • shell命令:getevent和sendevent
    1.getevent输出所有event设备的基本信息 输出格式:设备名:事件type事件code事件value注意:这里的数字都是16进制。getevent-c10//输出10条信息后退出getevent-l//将type、code、value以对应的常量名称显示使用getevent-l命令后输出结果格式为:  对应的数字代码转......
  • Get请求
     GET不支持GetRequestStream(),所以不能写进去:stringbaseUrl="http://";stringtoken="";try{HttpWebRequestrequest=(HttpWebRequest)HttpWebRequest.Create(......
  • Arc get_mut
    ///Returnsamutablereferenceintothegiven`Arc`,ifthereare///noother`Arc`or[`Weak`]pointerstothesameallocation.//////Returns[`None`]otherwise,becauseitisnotsafeto///mutateasharedvalue.//////See......
  • MyBatis+Sharding-JDBC实体类LocalDateTime类型字段查询报SQLFeatureNotSupportedExce
    问题最近协助渠道组开发新需求,封装实现了一个公共模块供不同渠道项目使用。以前各个渠道项目有很多相似的菜单和功能,各自项目里自己的代码实现,本公共模块对新需求的功能点进行抽象,减少重复代码,提高模块复用性和可维护性。目前有2个渠道项目接入了该公共模块,自测时发现其中1个运......
  • Elasticsearch专题精讲—— REST APIs —— Document APIs —— 索引API
    RESTAPIs——DocumentAPIs——索引APIhttps://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-index_.html#docs-index_ AddsaJSONdocumenttothespecifieddatastreamorindexandmakesitsearchable.Ifthetargetisanindexandth......
  • 2305.19270Learning without Forgetting for Vision-Language Models
    https://arxiv.org/pdf/2305.19270.pdf2305.19270.pd  AbstractClass-IncrementalLearning(CIL)orcontinuallearningisadesiredcapabilityintherealworld,whichrequiresalearningsystemtoadapttonewtaskswithoutforgettingformerones.Whiletradi......