Skip to content

7.0.0-alpha 1 - Wrong converting datetime fields #3719

@lukapor

Description

@lukapor

I upgraded es to version 7 in our product.

I have one document with CreatedDate

[Date(Store = false)]
public DateTime CreatedDate { get; set; }

Then I have some DateRange query on CreatedDate.
In some case I got error for es server, depends on Date i pass.

{"took":4,"responses":[{"error":{"root_cause":[{"type":"date_time_parse_exception","reason":"date_time_parse_exception: Text '2019-05-06T07:38:35.82' could not be parsed, unparsed text found at index 19"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":4,"index":"sprint_loop_stream2","node":"UEMUX6kGRMSHdGfJC8KKhQ","reason":{"type":"parse_exception","reason":"failed to parse date field [2019-05-06T07:38:35.82] with format [strict_date_optional_time||epoch_millis]: [Text '2019-05-06T07:38:35.82' could not be parsed, unparsed text found at index 19]","caused_by":{"type":"date_time_parse_exception","reason":"date_time_parse_exception: Text '2019-05-06T07:38:35.82' could not be parsed, unparsed text found at index 19"}}}],"caused_by":{"type":"date_time_parse_exception","reason":"date_time_parse_exception: Text '2019-05-06T07:38:35.82' could not be parsed, unparsed text found at index 19"}},"status":400}]}

if date is
2019-05-06T07:38:35.82 query fails
if date is
2019-05-06T07:38:35.8200001 query succeced.

I suspect the new internal serializer (utf8json)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions