Skip to content
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

searchAfter with a null date, bring parse_exception #1690

Open
lisongHo opened this issue Dec 26, 2024 · 0 comments
Open

searchAfter with a null date, bring parse_exception #1690

lisongHo opened this issue Dec 26, 2024 · 0 comments

Comments

@lisongHo
Copy link

Please use the following questions as a guideline to help me answer
your issue/question without further inquiry. Thank you.

Which version of Elastic are you using?

elastic.v7 (for Elasticsearch 7.x)
github.com/olivere/elastic/v7 v7.0.32

Please describe the expected behavior

should not trigging an exception

Please describe the actual behavior

all shard failed
parse_exception
failed to parse date field [-9223372036854776000] with format [strict_date_optional_time||epoch_millis]: [failed to parse date field [-9223372036854776000] with format [strict_date_optional_time||epoch_millis]]

Any steps to reproduce the behavior?

I am using a delivered_at(date) and shipment_id to sort,
For deep pagination , I using searchAfter
but you know , some shipments are not delivered, and the delivered_at would be a null value
then you will return [-9223372036854776000]+shipment_id result.Hits.Hits[len(result.Hits.Hits)-1].Sort

in the next time , I using [-9223372036854776000]+shipment_id as a cursor to search next page, es will return a parse_exception

In Java, using Long.MIN_VALUE[-9223372036854775808] to represent a null Date

so I try to change [-9223372036854776000] to [-9223372036854775808], it worked !

Although we can solve this problem by modifying our own code, but I still hope you can help solve the problem from the root when you have free time

Your project has been of great help to us
thank you very much~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant