Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
-
0
-
SDK16
Description
Suggested Release Note:
Fixed a regression in Java SDK 3.4.5 that could cause Full-Text Search results to be sorted in the wrong order if the sort option was specified using a mix of strings and `SearchSort` objects.
Example:
cluster.searchQuery(
|
"myIndex", |
SearchQuery.queryString("pool"), |
SearchOptions.searchOptions()
|
.sort("type", SearchSort.byField("description")) |
);
|
Set a breakpoint in ClassicCoreSearchOps.injectOptions where the sort array is generated.
expected value for the sort field:
["type",{"by":"field","desc":false,"field":"name"}]
|
actual value:
[{"by":"field","desc":false,"field":"name"},"type"]
|
Note that the sort tiers specified as strings are always appended to the end of the list, instead of appearing in the order they were added to the sort.