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…
Reference in New Issue