Defining variables inside elasticsearch queries

Hi,

Can we define variables inside elasticsearch query? For Ex:

"query": {
        "range" : {
            "date" : {
                "gte" : "now-1d/d",
                "lt" :  "now/d"
            }
        }
    }

In this range query, I want to set gte and lte based on @timestamp field or some variable value, and not relative or absolute value.

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