-
Notifications
You must be signed in to change notification settings - Fork 1.3k
No mapping found for [###] in order to sort on #3072
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
This indeed should not be; I'll have to try this locally, but I might not find the time until the weekend. |
Thanks in advance! Meanwhile I have a workaround using a separate Sort parameter: |
Closes spring-projects#3072 Signed-off-by: Peter-Josef Meisch <[email protected]>
Original Pull Request #3074 Closes #3072 Signed-off-by: Peter-Josef Meisch <[email protected]>
Original Pull Request #3074 Closes #3072 Signed-off-by: Peter-Josef Meisch <[email protected]> (cherry picked from commit 4238362)
Original Pull Request #3074 Closes #3072 Signed-off-by: Peter-Josef Meisch <[email protected]> (cherry picked from commit 4238362) (cherry picked from commit 88e2e9d)
implememted in main, backported to branches 5.4.x and 5.3.x. |
Thank you very much! Cheers |
Hey, it looks like this change broke my code. Using 5.3.9, this code worked, and in 5.3.10 it does not.
The resulting query on 5.3.9 got this (working) sort clause:
This after this change, on 5.3.10, it removes the .keyword suffix:
The consequence is that I get the following error:
I suspect that this was unintentional, and may be a bug? @sothawo what do you think? |
That's the same error as originally described in this issue. This is resolved and will be available with the next release of main, 5.4.x and 5.3.x. |
@sothawo I'm not understanding something. I though the fix was in 5.3.10, because 5.3.10 seems to have been released March 14th and the fixing commit d7abbc7 was merged on March 9th into the 5.3.X branch? So I assumed 5.3.10 would have the fix. |
Hello guys!
First and foremost, thanks for this awesome addition to the Spring ecosystem! I have a problem, though:
Here's an excerpt from an Elasticsearch document:
Here's my Java POJO for this document:
Here's my repository:
When invoking the method, the following error occurs:
No mapping found for [monitoringEvent.monitoringDatetime] in order to sort on
. So the problem is around theOrderBy
clause of the repo method.The sort clause of the underlying REST query is:
"sort":[{"monitoringEvent.monitoringDatetime":{"mode":"min","order":"asc"}}]
The error is that
monitoringEvent
does not exist in Elasticsearch document, onlymonitoring_event
. Am I doing something wrong (missing config, annotation, etc), or it is indeed a bug? The sort param should be in the same form as at the annotated@Field
name parameter, so, in this case,monitoring_event.monitoring_datetime
.Thanks in advance for any replies.
regards,
Daniel
The text was updated successfully, but these errors were encountered: