-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[BUG] failed to parse date field [-9223372036854775808] with format [strict_date_optional_time||epoch_millis] when value is in string #17120
Comments
A search of the issue tracker for 9223372036854775808 turns up a few similar, though probably unrelated issues. |
[Search Triage] @Trisped thanks for filing this - can you validate once if this is reproduce-able in recent 2.x release like 2.18? |
@sandeshkr419 Sorry, I don't have an environment where I can do that. |
Yeah --- this is probably an outstanding bug. As a workaround, you might be able to follow the advice from #1490 and override the @Trisped, out of curiosity, does it end up working if you change I fixed something that feels similar in #12676, but it was only addressing the sort side of things, not the |
@msfroh Yes, I tried searching with |
Awesome! Thanks for looking into it. In a pinch, we could probably change the minimum missing value to In truth, though, we should support Without reproducing it and getting a full stack trace, I'm guessing that it fails on this line. Specifically, it's peeled off the negative sign and then tries parsing the resulting positive number into a I added the following to the end of
|
Describe the bug
When sorting by a date field, if the field is not present on a record and "missing": "_first", "order": "asc" is specified (probably also applies to opposite) in the sort array, the returned sort array returns -9223372036854775808 for the sort value. If that value is passed back into the search_after array (for the next query) as a string, an error is returned: "failed to parse date field [-9223372036854775808] with format [strict_date_optional_time||epoch_millis]"
If it is passed as a number, it works fine.
If any other valid long value is passed as a string, it works fine.
Since
Long.MIN_VALUE = -Long.MAX_VALUE - 1
andLong.MIN_VALUE = -9223372036854775808
I expect that this is an unhandled edge case.Related component
Search:Resiliency
To Reproduce
"-9223372036854775808"
in the search_after fieldNote: it may be required to have actual records which are missing the date field and you may need to have an ID field so the sort works correctly.
Sample query:
Expected behavior
Query returns next set of results (no exception).
Additional Details
Plugins
None
Screenshots
Host/Environment (please complete the following information):
Additional context
Full exception:
The text was updated successfully, but these errors were encountered: