-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Sorting by a InnerField from Multifield is no longer working #3081
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
That is not correct, thanks for finding and reporting. When parsing a property path Spring Data Elasticsearch should not stop at the first unknown property - as it might come from an external defined mapping, but add these parts to the resulting path.
|
Closes spring-projects#3081 Signed-off-by: Peter-Josef Meisch <[email protected]>
Closes spring-projects#3081 Signed-off-by: Peter-Josef Meisch <[email protected]>
Original Pull Request #3082 Closes #3081 Signed-off-by: Peter-Josef Meisch <[email protected]> (cherry picked from commit 1ae6301)
implemented in main and backported to branches 5.4.x and 5.3.x |
Original Pull Request #3082 Closes #3081 Signed-off-by: Peter-Josef Meisch <[email protected]> (cherry picked from commit 1ae6301) (cherry picked from commit 394fb7a)
Hello, after trying to upgrade to the latest version 5.4.4 it seems that sorting by inner fields is no longer working at all. This change of behavior is caused by the adjustments made in #3074.
Until now we had the following part in a separate
mapping.json
with no annotations at all on thename
property in our User class:The inner field
name.raw
is used for sorting purposes only, like inrepository.findAll(Sort.by("name.raw")
.Now the added manipulation of sort parameters added in
MappingElasticsearchConverter.updatePropertiesInFieldsSortAndSourceFilter
removes the.raw
part from the sort parameter, which causes the whole query to fail as text fields are not optimised for sorting and therefore the operation is disabled by default.I already tried moving the field information from the
mapping.json
directly to the class like the following, which created the correct mapping during index recreation, but the sort manipulation is still happening as if the model is not aware of its own inner field:Am I missing something or is there no way to sort by
name.raw
now in the latest version?The text was updated successfully, but these errors were encountered: