mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-18 19:05:06 +00:00
fix optimization to not do sorting when searching with score "desc" sorting
This commit is contained in:
parent
7d29896190
commit
910ad2a408
@ -102,7 +102,7 @@ public class QueryPhase implements SearchPhase {
|
||||
boolean sort = false;
|
||||
// try and optimize for a case where the sorting is based on score, this is how we work by default!
|
||||
if (searchContext.sort() != null) {
|
||||
if (searchContext.sort().getSort().length > 0) {
|
||||
if (searchContext.sort().getSort().length > 1) {
|
||||
sort = true;
|
||||
} else {
|
||||
SortField sortField = searchContext.sort().getSort()[0];
|
||||
|
Loading…
x
Reference in New Issue
Block a user