You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ds...@apache.org on 2026/07/29 12:26:16 UTC
(solr) 02/03: SOLR-17715: un-deprecate CommonParams.QT (#4461)
This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
commit 48999b0d5d88c6a93c73794e92f8558b00ec60aa
Author: David Smiley <ds...@apache.org>
AuthorDate: Tue Jul 14 09:02:29 2026 -0400
SOLR-17715: un-deprecate CommonParams.QT (#4461)
(cherry picked from commit 51557ecf3f97d4ded66146aedc22555c9844ee62)
(cherry picked from commit aa5179dbb9ded8879820bc0ccd799694e6153e3a)
---
changelog/unreleased/SOLR-17715-undeprecate-qt.yml | 8 ++++++++
.../src/java/org/apache/solr/client/solrj/SolrQuery.java | 13 ++++++++-----
.../java/org/apache/solr/common/params/CommonParams.java | 9 +++++----
3 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/changelog/unreleased/SOLR-17715-undeprecate-qt.yml b/changelog/unreleased/SOLR-17715-undeprecate-qt.yml
new file mode 100644
index 00000000000..80773d6449e
--- /dev/null
+++ b/changelog/unreleased/SOLR-17715-undeprecate-qt.yml
@@ -0,0 +1,8 @@
+title: Un-deprecate 'qt' for certain use-cases where there's no alternative.
+type: deprecated
+authors:
+ - name: David Smiley
+ nick: dsmiley
+links:
+ - name: SOLR-17715
+ url: https://issues.apache.org/jira/browse/SOLR-17715
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java b/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java
index 8bc477b2fc1..07068b2be8e 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java
@@ -22,6 +22,7 @@ import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.regex.Pattern;
+import org.apache.solr.client.solrj.request.QueryRequest;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.FacetParams;
import org.apache.solr.common.params.HighlightParams;
@@ -1132,14 +1133,16 @@ public class SolrQuery extends ModifiableSolrParams {
}
/**
- * The Request Handler to use (see the solrconfig.xml), which is stored in the "qt" parameter.
- * Normally it starts with a '/' and if so it will be used by {@link
- * org.apache.solr.client.solrj.request.QueryRequest#getPath()} in the URL instead of the "qt"
- * parameter. If this is left blank, then the default of "/select" is assumed.
+ * The Request Handler to use (see the solrconfig.xml), starting with a '/'. This isn't passed to
+ * Solr as a parameter; instead {@link QueryRequest} uses it for the path. QueryRequest uses
+ * "/select" if no path or request-handler is provided. Since this isn't <em>really</em> a
+ * parameter in practice, it's preferrable to set this in the constructor of QueryRequest, or the
+ * setter instead.
*
* @param qt The Request Handler name corresponding to one in solrconfig.xml on the server.
* @return this
- * @deprecated Use {@link SolrRequest#setPath(String)}
+ * @deprecated use QueryRequest#QueryRequest(String, SolrParams)
+ * @see SolrRequest#setPath(String)
*/
@Deprecated
public SolrQuery setRequestHandler(String qt) {
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
index 57f091d3463..f6c113b97ba 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
@@ -36,12 +36,13 @@ public interface CommonParams {
String TZ = "TZ";
/**
- * the Request Handler (formerly known as the Query Type) - which Request Handler should handle
- * the request.
+ * the Request Handler (formerly known as the Query Type) to route to as seen in solrconfig.xml.
*
- * @deprecated route requests by path instead, not using this parameter
+ * <p>Note: in a standard request, the handler is the last path component of the URL, not this
+ * parameter. This parameter is used for special cases when there is no path like a warming query
+ * or streaming expressions or some other places.
*/
- @Deprecated String QT = "qt";
+ String QT = "qt";
/** the response writer type - the format of the response */
String WT = "wt";