Apache Solr open-source search software
SOLR-17715: un-deprecate CommonParams.QT (#4461)
David Smiley51557ecf3f97
diff --git a/changelog/unreleased/SOLR-17715-undeprecate-qt.yml b/changelog/unreleased/SOLR-17715-undeprecate-qt.ymlnew file mode 100644index 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-17715diff --git a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adocindex c7b1962ce03..762c5e440d8 100644--- a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc+++ b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc@@ -99,6 +99,9 @@ It is intended as a temporary measure while you migrate the affected accounts toHttpSolrClient returns; this time as a base class for HttpJettySolrClient and HttpJdkSolrClient.Its builder will dynamically detect if solr-jetty is available and use that, otherwise it will use the JDK client.+CommonParams.QT has been un-deprecated.+Nonetheless, if your code makes explicit reference to "qt" when constructing a standard request, there is usually a better way.+=== Embedded Jetty ConfigurationSolr 10.1 upgrades the embedded server to Eclipse Jetty 12.1, which removed Jetty's directory-scanning deployer (the `DeploymentManager` and `ContextProvider` classes).diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/SolrQuery.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/SolrQuery.javaindex 23a3c459f76..f07741e996e 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/SolrQuery.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/SolrQuery.java@@ -1134,14 +1134,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)*/@Deprecatedpublic 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.javaindex 052d0104bff..2e9e5b89a82 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";