Running percolate query against document date value

I have a query that checks to see if a date is more than a year old with something like:

"range": {
  "some_date": {
    "gt": "now-1y"

But I need to also figure out if that document WILL BE more than a year old on some other date.

Is it possible to dynamically change the now value or something similar? Or do I need to replace now with something like doc['passed_in_date']-1y?

Every attempt I've tried has yielded something like failed to parse date field [doc['passed_in_date']]

I'm very new to Elasticsearch. Thanks for your help.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.