-
Notifications
You must be signed in to change notification settings - Fork 1.3k
DocumentAdapters converts sort values to string #2777
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
Comments
I have to check into this one. I remember that the new Elasticsearch client in the beginning used to always return the sort values in a String array, but they may have changed this in the meantime. |
sothawo
added a commit
to sothawo/spring-data-elasticsearch
that referenced
this issue
Nov 30, 2023
sothawo
added a commit
that referenced
this issue
Nov 30, 2023
Will this go into 5.1.7? |
yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When upgrading from 4.2.12 to 5.1.5 search_after on sorted date fields, that does not specify pattern, no longer works.
In 4.2.12 the returned sort value was Long (epoch_millis).
In 5.1.5 it is converted to a String.
It happens her:
org.springframework.data.elasticsearch.client.elc.DocumentAdapters
If that String is used in search_after Elasticsearch fails with "failed to parse date field".
When it stays as a Long it works fine.
One could add "format" pattern to the sort part to fix this so it uses that pattern consistently, but the use of Long also worked, so my question is, why are these converted to string?
The text was updated successfully, but these errors were encountered: