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

Elasticsearch专题精讲—— REST APIs —— Document APIs —— Delete by query API

时间:2023-06-02 17:26:33浏览次数:42  
标签:www APIs docs 精讲 REST Elasticsearch query delete

REST APIs —— Document APIs —— Delete by query API

https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-delete-by-query.html

Deletes documents that match the specified query.

删除与指定查询匹配的文档。

        curl -X POST "localhost:9200/my-index-000001/_delete_by_query?pretty" -H 'Content-Type: application/json' -d'
        {
          "query": {
            "match": {
              "user.id": "elkbee"
            }
          }
        }'
    

1、Request(请求)

https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-delete-by-query.html#docs-delete-by-query-api-request

        POST //_delete_by_query

        POST//_delete_by_query
    

2、Prerequisites(先决条件)

https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-delete-by-query.html#docs-delete-by-query-api-prereqs

If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:

如果启用了 Elasticsearch 安全特性,您必须对目标数据流、索引或别名拥有以下索引特权:

    • read
    • delete or write
    • 删除或写入

标签:www,APIs,docs,精讲,REST,Elasticsearch,query,delete
From: https://www.cnblogs.com/zuoyang/p/17452402.html

相关文章

  • Elasticsearch专题精讲—— REST APIs —— Document APIs —— Delete API
    RESTAPIs——DocumentAPIs——DeleteAPIRemovesaJSONdocumentfromthespecifiedindex.从指定的索引中移除JSON文档。1、Request(请求)https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-delete.......
  • Elasticsearch专题精讲—— REST APIs —— Document APIs —— GET API
     RESTAPIs——DocumentAPIs——GETAPIhttps://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-get.html#docs-getRetrievesthespecifiedJSONdocumentfromanindex.从索引中检索指定的JSON文档。......
  • mysql一键生成APIs应用
     Go&Rust......
  • 基于shiro+jwt的真正rest url权限管理,前后端分离
    bootshiro&usthebootshiro是基于springboot+shiro+jwt的真正restfulURL资源无状态认证权限管理系统的后端usthe是restfulURL资源无状态认证权限管理系统的前端,基于angular+typeScript+adminLte区别于一般,提供页面可配置式的,动态的restfulapi安全管理支持数据传输动态......
  • adb restarting in TCP mode port: 5555
    adb连接出现以下问题:restartinginTCPmodeport:5555出现原因一是由于adb连接了多个设备,二是系统自行安装的adb,模拟器里面又自带的adb解决办法:对于第一种我们可以查看连接设备,及其设备号,进入指定设备。对于其他命令也是一样的。输入:adb-s设备号命令如果只有一个模拟器和一......
  • Deep Isolation Forest for Anomaly Detection
    DeepIsolationForestforAnomalyDetection1INTRODUCTIONIForest的缺点它的与坐标轴平行的隔离方法会导致它在高维/非线性空间中难以检测到异常。如图1所示。红色为异常节点,蓝色为正常节点。红色被蓝色所包围,这种情况无法被直接用平行于x或者平行于y的分割方法隔离......
  • NodeManager REST API’s
    NodeManagerRESTAPI’sOverviewEnablingCORSsupportNodeManagerInformationAPIApplicationsAPIApplicationAPIContainersAPIContainerAPIOverviewTheNodeManagerRESTAPI’sallowtheusertogetstatusonthenodeandinformationaboutapplicationsandcont......
  • 理解RESTful 架构
    REST是所有Web应用都应该遵守的架构设计指导原则。 RepresentationalStateTransfer,翻译是”表现层状态转化”。 面向资源是REST最明显的特征,对于同一个资源的一组不同的操作。资源是服务器上一个可命名的抽象概念,资源是以名词为核心来组织的,首先关注的是名词。REST要求,必须通......
  • 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......
  • 最佳实践:如何设计 RESTful API ?
    良好的API设计是一个经常被提及的话题,特别是对于那些试图完善其API策略的团队来说。一个设计良好的API的好处包括:改进开发者体验、更快速地编写文档以及更高效地推广你的API。但是,到底什么才构成了良好API设计呢?在这篇博客文章中,我将详细介绍几个为RESTfulAPIs设计最佳......