HightLevelRestClient RangeQuery Date form parse error

when I using

"yyyy-MM-dd'T'HH:mm:ss.SSSZ"

("Z" upperCase) in request body, has error,

but

"yyyy-MM-dd'T'HH:mm:ss.SSSz"

("z" lowerCase) works?

my error:

"reason": {
                "type": "parse_exception",
                "reason": "failed to parse date field [2019-12-26T08:15:22.000Z] with format [yyyy-MM-dd'T'HH:mm:ss.SSSZ]: [Text '2019-12-26T08:15:22.000Z' could not be parsed at index 23]",
                "caused_by": {
                    "type": "date_time_parse_exception",
                    "reason": "Text '2019-12-26T08:15:22.000Z' could not be parsed at index 23"
                }
            }

my mapping:

"mappings" : {
  "properties" : {
    "eventEndTime" : {
      "type" : "date",
      "format" : "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
    }
  }
}

my request:

{
    "range": {
        "eventStartTime": {
            "from": null,
            "to": "2019-12-26T08:15:22.000Z",
            "include_lower": true,
            "include_upper": true,
            "format": "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
            "boost": 1
        }
    }
}

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