How can we fetch the value of a field/variable and use it in Kibana filter (in DSL Query)

Viewed 70

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

0 Answers
Related