我们如何获取字段/变量的值并在Kibana滤波器中使用(在DSL查询中)

发布于 2025-01-22 17:43:06 字数 351 浏览 2 评论 0原文

我有两个字段“ expiry_date”和“ current_date”。 “ current_date”是当今的日期,它将继续改变。 我想添加一个Kibana滤镜以搜索和显示“ Expiry_date”大于或等于“ Current_date”的文档。 我无法使用“现在”的关键字,因为它仅适用于日期格式,而“ Expiry_date”以字符串格式使用。

我不确定,但是试图像

{
  "range": {
     "expiry_date": {
       "gte": "doc[current_date].value"
        }
      }
 }

任何人一样添加过滤器,请在这里引导我

I have two fields "expiry_date" and "current_date". "current_date" is the today's date and it will keep changing.
I want to add a Kibana filter to search and display the documents where "expiry_date" is greater than or equal to "current_date".
I am unable to use "now" keyword as it only works with date formats and "expiry_date" is in string format.

I am not sure but trying to add a filter like

{
  "range": {
     "expiry_date": {
       "gte": "doc[current_date].value"
        }
      }
 }

Could anybody please guide me here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文