Elasticsearch Query Error : Unknown key for a START_OBJECT in [range]

I am trying to fetch the last 24 hour data by the following query. while running this queries individually, it works perfect, but when combined it gives the following error :

Query:

{
  "size": 0,
  "aggs": {
    "percentileCalculated": {
      "percentiles": {
        "field": "baseValueUnitAmount",
        "keyed": false
      }
    }
  },
    "range":{
            "date":{
                "gte": "now-1d/d",
                "lt" : "now"
            }
      }
}

Error:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "parsing_exception",
        "reason" : "Unknown key for a START_OBJECT in [range].",
        "line" : 11,
        "col" : 13
      }
    ],
    "type" : "parsing_exception",
    "reason" : "Unknown key for a START_OBJECT in [range].",
    "line" : 11,
    "col" : 13
  },
  "status" : 400
}

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