You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2024/05/17 01:00:44 UTC
(solr) 02/05: Remove singlePassExplain logic
This is an automated email from the ASF dual-hosted git repository.
hossman pushed a commit to branch SOLR-17296
in repository https://gitbox.apache.org/repos/asf/solr.git
commit 31660e7a525923d3e0994353cc6c7384e74724b8
Author: Chris Hostetter <ho...@apache.org>
AuthorDate: Thu May 16 15:06:28 2024 -0700
Remove singlePassExplain logic
This gets us back to the simple case of all tests failing with NPE
---
.../solr/handler/component/QueryComponent.java | 32 ----------------------
1 file changed, 32 deletions(-)
diff --git a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
index 4bc2a867ab2..a421dcc42df 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
@@ -89,7 +89,6 @@ import org.apache.solr.search.QueryParsing;
import org.apache.solr.search.QueryResult;
import org.apache.solr.search.QueryUtils;
import org.apache.solr.search.RankQuery;
-import org.apache.solr.search.ReRankQParserPlugin;
import org.apache.solr.search.ReturnFields;
import org.apache.solr.search.SolrIndexSearcher;
import org.apache.solr.search.SolrReturnFields;
@@ -782,7 +781,6 @@ public class QueryComponent extends SearchComponent {
boolean distribSinglePass = rb.req.getParams().getBool(ShardParams.DISTRIB_SINGLE_PASS, false);
if (distribSinglePass
- || singlePassExplain(rb.req.getParams())
|| (fields != null
&& fields.wantsField(keyFieldName)
&& fields.getRequestedFieldNames() != null
@@ -864,36 +862,6 @@ public class QueryComponent extends SearchComponent {
rb.addRequest(this, sreq);
}
- private boolean singlePassExplain(SolrParams params) {
-
- /*
- * Currently there is only one explain that requires a single pass
- * and that is the reRank when scaling is used.
- */
-
- String rankQuery = params.get(CommonParams.RQ);
- if (rankQuery != null) {
- if (rankQuery.contains(ReRankQParserPlugin.RERANK_MAIN_SCALE)
- || rankQuery.contains(ReRankQParserPlugin.RERANK_SCALE)) {
- boolean debugQuery = params.getBool(CommonParams.DEBUG_QUERY, false);
- if (debugQuery) {
- return true;
- } else {
- String[] debugParams = params.getParams(CommonParams.DEBUG);
- if (debugParams != null) {
- for (String debugParam : debugParams) {
- if (debugParam.equals("true")) {
- return true;
- }
- }
- }
- }
- }
- }
-
- return false;
- }
-
protected boolean addFL(StringBuilder fl, String field, boolean additionalAdded) {
if (additionalAdded) fl.append(",");
fl.append(field);