Time range variable


I want to add time range in lucene query which user select from time filter. The main problem is I want to add multiple date filter in same report in elasticsearch


a time range you can implement for example that way:
candidate.create_date:[“now-1d” TO “now”]

I think you can use own variables in this lucene query:


Could you please suggest how to give generic value in FROM. Like I want to see document count for time range between whatever is selected to now-30 days. It means all the document count in the index since starting to now-30d.

candidate.create_date:[“???” TO “now-30d”]

I tried with candidate.create_date < “now-30d” but < > = operators are not working in Grafana Lucene Query field.