diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 05252c33469..6755b706ad6 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -253,6 +253,8 @@ Other Changes * SOLR-9367: Improved TestInjection's randomization logic to use LuceneTestCase.random() (hossman) +* SOLR-9331: Remove ReRankQuery's length constructor argument and member. (Christine Poerschke) + ================== 6.1.0 ================== Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release. diff --git a/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java index 3f0bb0e7ddb..a903968058a 100644 --- a/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java +++ b/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java @@ -42,7 +42,6 @@ import org.apache.lucene.search.TopScoreDocCollector; import org.apache.lucene.search.Weight; import org.apache.lucene.util.BytesRef; import org.apache.solr.common.SolrException; -import org.apache.solr.common.params.CommonParams; import org.apache.solr.common.params.SolrParams; import org.apache.solr.handler.component.MergeStrategy; import org.apache.solr.handler.component.QueryElevationComponent; @@ -91,10 +90,7 @@ public class ReRankQParserPlugin extends QParserPlugin { double reRankWeight = localParams.getDouble(RERANK_WEIGHT, RERANK_WEIGHT_DEFAULT); - int start = params.getInt(CommonParams.START,CommonParams.START_DEFAULT); - int rows = params.getInt(CommonParams.ROWS,CommonParams.ROWS_DEFAULT); - int length = start+rows; - return new ReRankQuery(reRankQuery, reRankDocs, reRankWeight, length); + return new ReRankQuery(reRankQuery, reRankDocs, reRankWeight); } } @@ -121,7 +117,6 @@ public class ReRankQParserPlugin extends QParserPlugin { private Query mainQuery = defaultQuery; final private Query reRankQuery; final private int reRankDocs; - final private int length; final private double reRankWeight; final private Rescorer reRankQueryRescorer; private Map boostedPriority; @@ -142,11 +137,10 @@ public class ReRankQParserPlugin extends QParserPlugin { reRankDocs == rrq.reRankDocs; } - public ReRankQuery(Query reRankQuery, int reRankDocs, double reRankWeight, int length) { + public ReRankQuery(Query reRankQuery, int reRankDocs, double reRankWeight) { this.reRankQuery = reRankQuery; this.reRankDocs = reRankDocs; this.reRankWeight = reRankWeight; - this.length = length; this.reRankQueryRescorer = new ReRankQueryRescorer(reRankQuery, reRankWeight); } @@ -171,7 +165,7 @@ public class ReRankQParserPlugin extends QParserPlugin { } } - return new ReRankCollector(reRankDocs, length, reRankQueryRescorer, cmd, searcher, boostedPriority); + return new ReRankCollector(reRankDocs, len, reRankQueryRescorer, cmd, searcher, boostedPriority); } @Override @@ -188,7 +182,7 @@ public class ReRankQParserPlugin extends QParserPlugin { public Query rewrite(IndexReader reader) throws IOException { Query q = mainQuery.rewrite(reader); if (q != mainQuery) { - return new ReRankQuery(reRankQuery, reRankDocs, reRankWeight, length).wrap(q); + return new ReRankQuery(reRankQuery, reRankDocs, reRankWeight).wrap(q); } return super.rewrite(reader); }