Defining variables inside elasticsearch queries


(Krishna Chaitanya) #1

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.


(system) #2

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