您可以使用以下 API 查询 procedure 字段不为空的数据:

GET /your-endpoint/_search
{
  "query": {
    "exists": {
      "field": "procedure"
    }
  }
}

在上面的查询中,我们使用 exists 查询来查找具有非空 procedure 字段的文档。如果您的索引具有不同的名称,请将其替换为 your-endpoint。

该 API 将返回一个包含所有匹配文档的结果集。如果您只想返回特定字段,可以使用 _source 字段:

GET /your-endpoint/_search
{
  "_source": ["field1", "field2"],
  "query": {
    "exists": {
      "field": "procedure"
    }
  }
}

这将仅返回 field1 和 field2 字段的值,这些字段包含非空的 procedure 字段的文档。

希望这可以帮助您进行您的查询!

ES 查询 procedure 字段不为空的数据 API

原文地址: https://www.cveoy.top/t/topic/oztR 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录