Hi,
I get parse_exception when I try to do this query:
{
"from":0,
"size":999,
"query":{
"bool":{
"filter":[
{
"range":{
"date_created":{
"from":"2020-09-01T23:59:59.000-03:00",
"to":"2020-09-01T23:59:59.000-03:00",
"include_lower":true,
"include_upper":true,
"format":"8uuuu-MM-dd'\''T'\''HH:mm:ss.SSSX||uuuu-MM-dd'\''T'\''HH:mm:ss.SSSXXX||uuuu-MM-dd'\''T'\''HH:mm:ss.SSSXXXXX||uuuu-MM-d'\''T'\''HH:mm:ss.SSSX||uuuu-MM-d'\''T'\''HH:mm:ss.SSSXXX||uuuu-MM-d'\''T'\''HH:mm:ss.SSSXXXXX",
"boost":1.0
}
}
}
],
"adjust_pure_negative":true,
"boost":1.0
}
},
"sort":[
{
"date_created":{
"order":"desc"
}
}
]
}
Exception details:
{"error":{"root_cause":[{"type":"parse_exception","reason":"failed to parse date field [2020-09-01T23:59:59.000-03:00] with format [8uuuu-MM-dd'T'HH:mm:ss.SSSX||uuuu-MM-dd'T'HH:mm:ss.SSSXXX||uuuu-MM-dd'T'HH:mm:ss.SSSXXXXX||uuuu-MM-d'T'HH:mm:ss.SSSX||uuuu-MM-d'T'HH:mm:ss.SSSXXX||uuuu-MM-d'T'HH:mm:ss.SSSXXXXX]: [Text '2020-09-01T23:59:59.000-03:00' could not be parsed, unparsed text found at index 26]"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"users","node":"2IUwcGlGQ0mEzsQZ7NgGAg","reason":{"type":"parse_exception","reason":"failed to parse date field [2020-09-01T23:59:59.000-03:00] with format [8uuuu-MM-dd'T'HH:mm:ss.SSSX||uuuu-MM-dd'T'HH:mm:ss.SSSXXX||uuuu-MM-dd'T'HH:mm:ss.SSSXXXXX||uuuu-MM-d'T'HH:mm:ss.SSSX||uuuu-MM-d'T'HH:mm:ss.SSSXXX||uuuu-MM-d'T'HH:mm:ss.SSSXXXXX]: [Text '2020-09-01T23:59:59.000-03:00' could not be parsed, unparsed text found at index 26]","caused_by":{"type":"date_time_parse_exception","reason":"Text '2020-09-01T23:59:59.000-03:00' could not be parsed, unparsed text found at index 26"}}}]},"status":400}
But if I change "include_upper":true to "include_upper":false, it's works.
{
"from":0,
"size":999,
"query":{
"bool":{
"filter":[
{
"range":{
"date_created":{
"from":"2020-09-01T23:59:59.000-03:00",
"to":"2020-09-01T23:59:59.000-03:00",
"include_lower":true,
"include_upper":false,
"format":"8uuuu-MM-dd'\''T'\''HH:mm:ss.SSSX||uuuu-MM-dd'\''T'\''HH:mm:ss.SSSXXX||uuuu-MM-dd'\''T'\''HH:mm:ss.SSSXXXXX||uuuu-MM-d'\''T'\''HH:mm:ss.SSSX||uuuu-MM-d'\''T'\''HH:mm:ss.SSSXXX||uuuu-MM-d'\''T'\''HH:mm:ss.SSSXXXXX",
"boost":1.0
}
}
}
],
"adjust_pure_negative":true,
"boost":1.0
}
},
"sort":[
{
"date_created":{
"order":"desc"
}
}
]
}
ES version: 6.8.4.
Could you please help me to understand this issue?
Thanks!