Apache Solr open-source search software
SOLR-17840, SOLR-17631: update LTRScoringQuery.java w.r.t. DisiPriorityQueue construction
Christine Poerschke4415d9e6026b
diff --git a/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRScoringQuery.java b/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRScoringQuery.javaindex 11e10032ffc..c68dc38cfbf 100644--- a/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRScoringQuery.java+++ b/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRScoringQuery.java@@ -568,7 +568,7 @@ public class LTRScoringQuery extends Query implements Accountable {if (featureScorers.size() <= 1) {throw new IllegalArgumentException("There must be at least 2 subScorers");}- subScorers = new DisiPriorityQueue(featureScorers.size());+ subScorers = DisiPriorityQueue.ofMaxSize(featureScorers.size());for (final Scorer scorer : featureScorers) {final DisiWrapper w = new DisiWrapper(scorer, false /* impacts */);subScorers.add(w);