我正在尝试构建一个 ScrollElasticSearchHttp 处理器,它将查询和过滤掉“描述”字段为空或空字段的记录
我在这里找到了一个查询来做到这一点,当我使用 POST 而不是 GET 时,它适用于我在 REST API 客户端 中。 https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html 当我使用 URL 查询时,它也适用于我的浏览器 (https://.../_search?q=(user%20is%20not%20null)
我应该在 nifi ScrollElasticSearchHttp 处理器中放入什么查询行 配置 特性 询问 就像在浏览器或 REST API 客户端中一样?
谢谢。
答案 0 :(得分:0)
ScrollElasticSearchHttp
处理器的 query
参数采用 Lucene 查询语法。 See docs。
请参阅有关 Lucene 语法的 Elastic 文档 here
This page 使用 not null
_exists_
的查询
因此您可以使用 _exists_:description
来获得 description
为 not null
的结果
This SO answer 为我指明了正确的方向