-
Notifications
You must be signed in to change notification settings - Fork 25.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
date parse error on range query in es 2 #14565
Comments
I have similar problem but a little different. In ElasticSearch 2.0 latest. Document:
Query
Result:
|
@lynneker7 that looks like the problem is with your query. Change lte to gte and you should see the document since the timestamp is after the queried timestamp. |
@jillesvangurp Sorry you're absolutely right. Thanks |
@spinscale any comments on this? cc @elastic/es-search-aggs |
ISO 8601 prescribes to use a 4 digit year, supporting years 0000 to 9999. It has an optional portion that uses +/- for years outside that range. It appears joda does not adhere to this part of the spec. We are currently converting joda time uses to java time (see #27330). I'm going to close this as there is no reason to investigate and try of fix joda when it is going away. |
I have a weird problem where Java 8 adds a plus sign to iso dates if the year is more than 4 characters
Before Elasticsearch 2.0 passing this into a range query on a date field was no problem either way but this started breaking during the migration to es 2:
This filter:
Now generates the following error:
The workaround is obvious and already implemented on my side (-1 to 9999).
But this error was sufficiently weird that I wanted to report it. Maybe it can be fixed by moving from joda to java 8's new date API as I think has been debated already. Alternatively the date pattern used by default could be adapted to allow the + sign.
The text was updated successfully, but these errors were encountered: