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/10/14 23:57:55 UTC

(solr) branch branch_10x updated (4507807d282 -> 0923eae38c1)

This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a change to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git


    from 4507807d282 SOLR-18297: Upgrade Jetty to 12.1.14 (#5059)
     new 8c5991838cf SOLR-18472 TikaServerExtractionBackend can hand out a reference to a stopped HttpClient (#4930)
     new aa3cafb3c6e SOLR-9759: Admin UI should post streaming expressions (#5048)
     new 744a12e308c SOLR-18234: Moved packagemanager CLI stuff to a CLI package (#5018)
     new 3fc8a230748 SOLR-4841: DetectedLanguage constructor should be public (#5070)
     new 7b562bd2612 SOLR-18494: Document one block style for commands in the Ref Guide (#5006)
     new 170419f08ba SOLR-16640: Admin UI's SQL screen shows an error instead of crashing (#5057)
     new 3bbb73659b2 SOLR-15395: Introduce coloured dots that update every ten seconds for health. (#5045)
     new 3bf98773bd9 SOLR-16396: Replace the GET /config/{component} wildcards with explicit paths (#5097)
     new fbf16dedeb8 SOLR-16396 | Migrate GET /config/overlay and GET /config/znodeVersion to JAX-RS. (#5022)
     new 09647735fb6 SOLR-18499: Drop the _introspect section from the v2 API page (#5123)
     new 0923eae38c1 SOLR-18498: Start the Core Admin examples in user-managed mode (#5122)

The 11 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../unreleased/SOLR-16396-config-get-others.yml    |   9 ++
 .../SOLR-18234-solr-cli-detangle-core.yml          |   9 ++
 .../SOLR-18472-tikaserver-httpclient-refcount.yml  |  10 ++
 ...LR-4841-detectedlanguage-public-constructor.yml |   8 ++
 .../solr-15395-admin-ui-collection-health.yml      |   8 ++
 .../solr-16640-admin-ui-sql-error-handling.yml     |   8 ++
 .../unreleased/solr-9759-admin-ui-stream-post.yml  |   8 ++
 dev-docs/ref-guide/asciidoc-syntax.adoc            |  33 ++++-
 .../apache/solr/client/api/endpoint/ConfigApi.java |  26 ++++
 ...ingResponse.java => ConfigOverlayResponse.java} |   5 +-
 ...etails.java => ConfigZnodeVersionResponse.java} |  17 ++-
 .../org/apache/solr/cli/PackageSubCommand.java     |   4 +-
 .../src/java/org/apache/solr/cli/PackageTool.java  |  16 +--
 .../java/org/apache/solr/cli/RunExampleTool.java   |   2 +-
 .../src/java/org/apache/solr/cli/ZkCpTool.java     |   2 +-
 .../src/java/org/apache/solr/cli/ZkMkrootTool.java |   2 +-
 .../src/java/org/apache/solr/cli/ZkMvTool.java     |   2 +-
 .../packagemanager/DefaultPackageRepository.java   |   2 +-
 .../{ => cli}/packagemanager/PackageManager.java   |  10 +-
 .../packagemanager/PackageRepository.java          |   2 +-
 .../{ => cli}/packagemanager/PackageUtils.java     |   4 +-
 .../packagemanager/RepositoryManager.java          |   8 +-
 .../solr/{ => cli}/packagemanager/SolrPackage.java |   2 +-
 .../packagemanager/SolrPackageInstance.java        |   6 +-
 .../{ => cli}/packagemanager/package-info.java     |   2 +-
 .../org/apache/solr/handler/SolrConfigHandler.java | 122 +++++++++---------
 .../apache/solr/handler/admin/api/GetConfig.java   |  29 +++++
 .../solr/handler/admin/api/GetConfigAPI.java       |  36 +++++-
 .../solr/{cloud => cli}/SolrCloudExampleTest.java  |  11 +-
 .../packagemanager/TestPackageManager.java         |   2 +-
 .../solr/filestore/TestDistribFileStore.java       |   9 +-
 .../solr/handler/admin/V2ConfigAPIMappingTest.java |   4 +-
 .../handler/admin/api/GetConfigSolrCloudTest.java  |  26 +++-
 .../solr/handler/admin/api/GetConfigTest.java      |  24 ++++
 .../solr/security/BasicAuthIntegrationTest.java    |  13 +-
 .../extraction/TikaServerExtractionBackend.java    |  39 +++---
 .../TikaServerExtractionBackendTest.java           |  65 ++++++++++
 .../solr/update/processor/DetectedLanguage.java    |   2 +-
 .../custom/CustomLanguageIdentifierTest.java       |  49 ++++++++
 .../configuration-guide/pages/configsets-api.adoc  |   6 +-
 .../configuration-guide/pages/coreadmin-api.adoc   |   6 +-
 .../configuration-guide/pages/package-manager.adoc |  30 ++---
 .../modules/configuration-guide/pages/v2-api.adoc  | 104 ++--------------
 .../deployment-guide/pages/enabling-ssl.adoc       |  34 ++---
 .../deployment-guide/pages/installing-solr.adoc    |   2 +-
 .../modules/deployment-guide/pages/node-roles.adoc |   6 +-
 .../pages/solr-control-script-reference.adoc       |  42 +++----
 .../pages/system-requirements.adoc                 |   2 +-
 .../pages/zookeeper-access-control.adoc            |   4 +-
 .../getting-started/pages/solr-tutorial.adoc       |   6 +-
 .../getting-started/pages/tutorial-aws.adoc        |  64 +++++-----
 .../getting-started/pages/tutorial-diy.adoc        |  20 +--
 .../getting-started/pages/tutorial-films.adoc      |  68 +++++-----
 .../pages/tutorial-five-minutes.adoc               |  18 +--
 .../getting-started/pages/tutorial-opennlp.adoc    |  48 ++++----
 .../getting-started/pages/tutorial-paramsets.adoc  |  16 +--
 .../getting-started/pages/tutorial-solrcloud.adoc  |  54 ++++----
 .../pages/tutorial-techproducts.adoc               |  46 +++----
 .../getting-started/pages/tutorial-vectors.adoc    |  10 +-
 .../indexing-guide/pages/indexing-with-tika.adoc   |  24 ++--
 .../modules/indexing-guide/pages/post-command.adoc |  56 ++++-----
 .../query-guide/pages/dense-vector-search.adoc     |  97 ++++++++-------
 .../query-guide/pages/pagination-of-results.adoc   |  12 +-
 .../pages/searching-nested-documents.adoc          |  32 ++---
 .../modules/query-guide/pages/spatial-search.adoc  |   4 +-
 .../modules/query-guide/pages/stream-command.adoc  |  24 ++--
 .../modules/query-guide/pages/tagger-handler.adoc  |   8 +-
 .../solrj/src/resources/java-template/api.mustache |   8 +-
 solr/test-framework/build.gradle                   |   4 +-
 solr/test-framework/gradle.lockfile                |   4 +-
 .../solr/cloud/AbstractFullDistribZkTestBase.java  |  28 ++---
 .../solr/webapp/AdminUiCollectionsScreenTest.java  |  20 +++
 .../apache/solr/webapp/AdminUiSqlScreenTest.java   |  52 +++++++-
 .../solr/webapp/AdminUiStreamScreenTest.java       |  41 ++++++
 solr/webapp/web/css/angular/collections.css        |  43 +++++++
 .../web/js/angular/controllers/collections.js      | 137 +++++++++++++++------
 solr/webapp/web/js/angular/controllers/sqlquery.js |  85 ++++++++-----
 solr/webapp/web/js/angular/controllers/stream.js   |  37 +++---
 solr/webapp/web/js/angular/services.js             |  39 ++++--
 solr/webapp/web/partials/collections.html          |   4 +-
 solr/webapp/web/partials/sqlquery.html             |   5 +-
 81 files changed, 1244 insertions(+), 742 deletions(-)
 create mode 100644 changelog/unreleased/SOLR-16396-config-get-others.yml
 create mode 100644 changelog/unreleased/SOLR-18234-solr-cli-detangle-core.yml
 create mode 100644 changelog/unreleased/SOLR-18472-tikaserver-httpclient-refcount.yml
 create mode 100644 changelog/unreleased/SOLR-4841-detectedlanguage-public-constructor.yml
 create mode 100644 changelog/unreleased/solr-15395-admin-ui-collection-health.yml
 create mode 100644 changelog/unreleased/solr-16640-admin-ui-sql-error-handling.yml
 create mode 100644 changelog/unreleased/solr-9759-admin-ui-stream-post.yml
 copy solr/api/src/java/org/apache/solr/client/api/model/{FileStoreDirectoryListingResponse.java => ConfigOverlayResponse.java} (87%)
 copy solr/api/src/java/org/apache/solr/client/api/model/{ActiveTaskDetails.java => ConfigZnodeVersionResponse.java} (76%)
 rename solr/core/src/java/org/apache/solr/{ => cli}/packagemanager/DefaultPackageRepository.java (98%)
 rename solr/core/src/java/org/apache/solr/{ => cli}/packagemanager/PackageManager.java (99%)
 rename solr/core/src/java/org/apache/solr/{ => cli}/packagemanager/PackageRepository.java (97%)
 rename solr/core/src/java/org/apache/solr/{ => cli}/packagemanager/PackageUtils.java (99%)
 rename solr/core/src/java/org/apache/solr/{ => cli}/packagemanager/RepositoryManager.java (98%)
 rename solr/core/src/java/org/apache/solr/{ => cli}/packagemanager/SolrPackage.java (98%)
 rename solr/core/src/java/org/apache/solr/{ => cli}/packagemanager/SolrPackageInstance.java (93%)
 rename solr/core/src/java/org/apache/solr/{ => cli}/packagemanager/package-info.java (95%)
 rename solr/core/src/test/org/apache/solr/{cloud => cli}/SolrCloudExampleTest.java (95%)
 rename solr/core/src/test/org/apache/solr/{ => cli}/packagemanager/TestPackageManager.java (98%)
 create mode 100644 solr/modules/langid/src/test/org/apache/solr/update/processor/custom/CustomLanguageIdentifierTest.java


(solr) 05/11: SOLR-18494: Document one block style for commands in the Ref Guide (#5006)

Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 7b562bd2612ba92d6d828dba9ffa4cda4a358c8e
Author: Serhiy Bzhezytskyy <me...@serhiy-bzhezytskyy.com>
AuthorDate: Sat Oct 10 14:49:35 2026 +0300

    SOLR-18494: Document one block style for commands in the Ref Guide (#5006)
    
    In the snapshot-export block, branch_10x's --snapshot-name option is kept;
    only the "$ " prompt prefix was dropped.
    
    Co-authored-by: Eric Pugh <ep...@opensourceconnections.com>
    (cherry picked from commit f879df0f0f25bbc5cd86bdee4f8b52d688a6551b)
---
 dev-docs/ref-guide/asciidoc-syntax.adoc            | 33 ++++++--
 .../configuration-guide/pages/configsets-api.adoc  |  6 +-
 .../configuration-guide/pages/package-manager.adoc | 30 +++----
 .../deployment-guide/pages/enabling-ssl.adoc       | 34 ++++----
 .../deployment-guide/pages/installing-solr.adoc    |  2 +-
 .../modules/deployment-guide/pages/node-roles.adoc |  6 +-
 .../pages/solr-control-script-reference.adoc       | 42 +++++-----
 .../pages/system-requirements.adoc                 |  2 +-
 .../pages/zookeeper-access-control.adoc            |  4 +-
 .../getting-started/pages/solr-tutorial.adoc       |  6 +-
 .../getting-started/pages/tutorial-aws.adoc        | 64 +++++++-------
 .../getting-started/pages/tutorial-diy.adoc        | 20 ++---
 .../getting-started/pages/tutorial-films.adoc      | 68 +++++++--------
 .../pages/tutorial-five-minutes.adoc               | 18 ++--
 .../getting-started/pages/tutorial-opennlp.adoc    | 48 +++++------
 .../getting-started/pages/tutorial-paramsets.adoc  | 16 ++--
 .../getting-started/pages/tutorial-solrcloud.adoc  | 54 ++++++------
 .../pages/tutorial-techproducts.adoc               | 46 +++++-----
 .../getting-started/pages/tutorial-vectors.adoc    | 10 +--
 .../indexing-guide/pages/indexing-with-tika.adoc   | 24 +++---
 .../modules/indexing-guide/pages/post-command.adoc | 56 ++++++-------
 .../query-guide/pages/dense-vector-search.adoc     | 97 ++++++++++++----------
 .../query-guide/pages/pagination-of-results.adoc   | 12 +--
 .../pages/searching-nested-documents.adoc          | 32 +++----
 .../modules/query-guide/pages/spatial-search.adoc  |  4 +-
 .../modules/query-guide/pages/stream-command.adoc  | 24 +++---
 .../modules/query-guide/pages/tagger-handler.adoc  |  8 +-
 27 files changed, 400 insertions(+), 366 deletions(-)

diff --git a/dev-docs/ref-guide/asciidoc-syntax.adoc b/dev-docs/ref-guide/asciidoc-syntax.adoc
index 2b590e145ef..a5445a398de 100644
--- a/dev-docs/ref-guide/asciidoc-syntax.adoc
+++ b/dev-docs/ref-guide/asciidoc-syntax.adoc
@@ -79,15 +79,38 @@ More info: https://docs.asciidoctor.org/asciidoc/latest/verbatim/source-blocks/
 
 === Source Block Syntax Highlighting
 
-The HTML output uses Rouge to add syntax highlighting to code examples.
+The HTML output uses https://highlightjs.org/[highlight.js] to add syntax highlighting to code examples.
 This is done by adding the language of the code block after the `source`, as shown in the above example source block (`xml` in that case).
 
-Rouge has a long selection of lexers available.
-You can see the full list at https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers.
-Use one of the valid short names to get syntax highlighting for that language.
+Only the languages in the highlight.js build of the Guide's UI bundle are highlighted.
+A block with any other language name is shown without highlighting, and the browser console logs a warning.
+Adding a language is a change to the UI bundle, not to the pages.
 
-Ideally, we will have an appropriate lexer to use for all source blocks, but that's not possible.
+Use `text` for output and for anything that needs no highlighting; `plain` and `nohighlight` behave the same.
 When in doubt, choose `text`, or leave it blank.
+Commands are the exception: see <<Command Blocks>>.
+
+=== Command Blocks
+
+Use the same block style for every `curl`, `bin/solr` or other shell command, so readers see one convention across the Guide:
+
+* A block with commands only uses `bash` and no prompt, so it can be copied as is.
+* A block that also shows the output of the commands uses `console`, with `$` at the start of each command line, so the commands stand out from the output.
+The copy button of the Guide copies only the `$` lines of such a block, so a command whose argument continues on the next lines without a trailing `\` (a multi-line JSON body) belongs in a `bash` block instead.
+* A block that shows output alone uses `text`.
+* The Windows variant of a command uses `powershell`, which the highlight.js build does not include yet, so it is shown without highlighting.
+
+.Example Command Blocks
+[source]
+----
+[source,bash]
+curl "http://localhost:8983/solr/films/select?q=*:*"
+
+[,console]
+$ bin/solr create -c films --shards 2 --replication-factor 2
+Creating new collection 'films' using command:
+http://localhost:7574/solr/admin/collections?action=CREATE&name=films&numShards=2&replicationFactor=2&collection.configName=films
+----
 
 === Importing Code Snippets from Other Files
 
diff --git a/solr/solr-ref-guide/modules/configuration-guide/pages/configsets-api.adoc b/solr/solr-ref-guide/modules/configuration-guide/pages/configsets-api.adoc
index e7373f7c9de..80620400138 100644
--- a/solr/solr-ref-guide/modules/configuration-guide/pages/configsets-api.adoc
+++ b/solr/solr-ref-guide/modules/configuration-guide/pages/configsets-api.adoc
@@ -178,7 +178,7 @@ With the v1 API, the `upload` command must be capitalized as `UPLOAD`:
 
 [source,bash]
 ----
-$ (cd solr/server/solr/configsets/sample_techproducts_configs/conf && zip -r - *) > myconfigset.zip
+(cd solr/server/solr/configsets/sample_techproducts_configs/conf && zip -r - *) > myconfigset.zip
 
 curl "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=myConfigSet" --header "Content-Type:application/octet-stream" --data-binary @myconfigset.zip
 ----
@@ -187,7 +187,7 @@ The same can be achieved using a Unix pipe with a single request as follows:
 
 [source,bash]
 ----
-$ (cd server/solr/configsets/sample_techproducts_configs/conf && zip -r - *) | curl "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=myConfigSet" --header "Content-Type:application/octet-stream" --data-binary @-
+(cd server/solr/configsets/sample_techproducts_configs/conf && zip -r - *) | curl "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=myConfigSet" --header "Content-Type:application/octet-stream" --data-binary @-
 ----
 ====
 
@@ -198,7 +198,7 @@ With the v2 API, the name of the configset to upload is provided as a path param
 
 [source,bash]
 ----
-$ (cd solr/server/solr/configsets/sample_techproducts_configs/conf && zip -r - *) > myconfigset.zip
+(cd solr/server/solr/configsets/sample_techproducts_configs/conf && zip -r - *) > myconfigset.zip
 
 curl -X PUT --header "Content-Type:application/octet-stream" --data-binary @myconfigset.zip
     "http://localhost:8983/api/configsets/myConfigSet"
diff --git a/solr/solr-ref-guide/modules/configuration-guide/pages/package-manager.adoc b/solr/solr-ref-guide/modules/configuration-guide/pages/package-manager.adoc
index 93c5d5882a8..75eb491c065 100644
--- a/solr/solr-ref-guide/modules/configuration-guide/pages/package-manager.adoc
+++ b/solr/solr-ref-guide/modules/configuration-guide/pages/package-manager.adoc
@@ -46,7 +46,7 @@ To enable it, start all Solr nodes with the `-Dsolr.packages.enabled=true` param
 
 [source,bash]
 ----
-$ bin/solr start -Dsolr.packages.enabled=true
+bin/solr start -Dsolr.packages.enabled=true
 ----
 
 WARNING: There are security consequences to enabling the package manager.
@@ -62,7 +62,7 @@ In order to install packages into Solr, one has to add a repository hosting the
 
 [source,bash]
 ----
-$ bin/solr package add-repo <repository-name> <repository-url>
+bin/solr package add-repo <repository-name> <repository-url>
 ----
 
 NOTE: Do not add repositories that you don't trust or control.
@@ -74,21 +74,21 @@ To list installed packages:
 
 [source,bash]
 ----
-$ bin/solr package list-installed
+bin/solr package list-installed
 ----
 
 To list packages available for installation from added repositories:
 
 [source,bash]
 ----
-$ bin/solr package list-available
+bin/solr package list-available
 ----
 
 To install a package, coping over the artifacts from the repository into Solr's internal package store and setting up classloader for this package to be used:
 
 [source,bash]
 ----
-$ bin/solr package install <package-name>[:<version>]
+bin/solr package install <package-name>[:<version>]
 ----
 
 === Deploy a Package
@@ -102,21 +102,21 @@ There are two ways to do this: either use the CLI's `deploy` command or manually
 If the package author states support for it, the package can be deployed with the CLI's `deploy` command.
 [source,bash]
 ----
-$ bin/solr package deploy <package-name>:[version] --collections <collection1>[,<collection2>,...] [--param <param1>=<val1> --param <param2>=<val2> ...
+bin/solr package deploy <package-name>:[version] --collections <collection1>[,<collection2>,...] [--param <param1>=<val1> --param <param2>=<val2> ...
 ----
 
 or
 
 [source,bash]
 ----
-$ bin/solr package deploy <package-name>:[version] --cluster
+bin/solr package deploy <package-name>:[version] --cluster
 ----
 
 If the package accepts parameters for its setup commands, they can be specified (as per package documentation):
 
 [source,bash]
 ----
-$ bin/solr package deploy <snipped...> --param <param1>=<val1> --param <param2>=<val2>
+bin/solr package deploy <snipped...> --param <param1>=<val1> --param <param2>=<val2>
 ----
 
 The author may want you to confirm deployment of a package via a prompt.
@@ -151,7 +151,7 @@ After deploying, verify that the collection is using the package:
 
 [source,bash]
 ----
-$ bin/solr package list-deployed -c <collection>
+bin/solr package list-deployed -c <collection>
 ----
 
 === Updating Packages
@@ -162,7 +162,7 @@ Next, install the new version of the package from the repositories.
 
 [source,bash]
 ----
-$ bin/solr package install <package-name>:<version>
+bin/solr package install <package-name>:<version>
 ----
 
 Once you have installed the new version, you can selectively update each of your collections or the cluster level plugins.
@@ -170,12 +170,12 @@ Assuming the old version is `1.0.0` of the package `mypackage`, and the new vers
 
 [source,bash]
 ----
-$ bin/solr package deploy mypackage:2.0.0 --update --collections mycollection
+bin/solr package deploy mypackage:2.0.0 --update --collections mycollection
 ----
 or
 [source,bash]
 ----
-$ bin/solr package deploy mypackage:2.0.0 --update --cluster
+bin/solr package deploy mypackage:2.0.0 --update --cluster
 ----
 
 You can run the `list-deployed` command to verify that this collection is using the newly added version.
@@ -186,7 +186,7 @@ If a package supports undeploying the plugins it contains (check package author'
 
 [source,bash]
 ----
-$ bin/solr package undeploy <package-name> --collections <collection1>[,<collection2>,...]
+bin/solr package undeploy <package-name> --collections <collection1>[,<collection2>,...]
 ----
 
 === Uninstall a Package
@@ -195,14 +195,14 @@ If a package has been undeployed or was never deployed, then it can be uninstall
 
 [source,bash]
 ----
-$ bin/solr package uninstall <package-name>:<package-version>
+bin/solr package uninstall <package-name>:<package-version>
 ----
 
 or
 
 [source,bash]
 ----
-$ bin/solr package deploy <package-name>:<package-version> --cluster
+bin/solr package deploy <package-name>:<package-version> --cluster
 ----
 
 Both package name and version are required.
diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/enabling-ssl.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/enabling-ssl.adoc
index 92e5af2d8f5..27b02b71415 100644
--- a/solr/solr-ref-guide/modules/deployment-guide/pages/enabling-ssl.adoc
+++ b/solr/solr-ref-guide/modules/deployment-guide/pages/enabling-ssl.adoc
@@ -39,9 +39,9 @@ The `-ext SAN=...` `keytool` option allows you to specify all the DNS names and/
 
 In addition to `localhost` and `127.0.0.1`, this example includes a LAN IP address `192.168.1.3` for the machine the Solr nodes will be running on:
 
-[source,terminal]
+[source,bash]
 ----
-$ keytool -genkeypair -alias solr-ssl -keyalg RSA -keysize 2048 -keypass secret -storepass secret -validity 9999 -keystore solr-ssl.keystore.p12 -storetype PKCS12 -ext SAN=DNS:localhost,IP:192.168.1.3,IP:127.0.0.1 -dname "CN=localhost, OU=Organizational Unit, O=Organization, L=Location, ST=State, C=Country"
+keytool -genkeypair -alias solr-ssl -keyalg RSA -keysize 2048 -keypass secret -storepass secret -validity 9999 -keystore solr-ssl.keystore.p12 -storetype PKCS12 -ext SAN=DNS:localhost,IP:192.168.1.3,IP:127.0.0.1 -dname "CN=localhost, OU=Organizational Unit, O=Organization, L=Location, ST=State, C=Country"
 ----
 
 The above command will create a keystore file named `solr-ssl.keystore.p12` in the current directory.
@@ -50,16 +50,16 @@ The above command will create a keystore file named `solr-ssl.keystore.p12` in t
 
 Convert the PKCS12 format keystore, including both the certificate and the key, into PEM format using the http://www.openssl.org[`openssl`] command:
 
-[source,terminal]
+[source,bash]
 ----
-$ openssl pkcs12 -in solr-ssl.keystore.p12 -out solr-ssl.pem
+openssl pkcs12 -in solr-ssl.keystore.p12 -out solr-ssl.pem
 ----
 
 If you want to use curl on OS X Yosemite (10.10), you'll need to create a certificate-only version of the PEM format, as follows:
 
-[source,terminal]
+[source,bash]
 ----
-$ openssl pkcs12 -nokeys -in solr-ssl.keystore.p12 -out solr-ssl.cacert.pem
+openssl pkcs12 -nokeys -in solr-ssl.keystore.p12 -out solr-ssl.cacert.pem
 ----
 
 === Set Common SSL-Related Environment Variables
@@ -148,9 +148,9 @@ If you created the SSL key without all DNS names or IP addresses on which Solr n
 *nix::
 +
 ====
-[source,terminal]
+[source,bash]
 ----
-$ bin/solr start --solr-home cloud/node1 -z server1:2181,server2:2181,server3:2181 -p 8984
+bin/solr start --solr-home cloud/node1 -z server1:2181,server2:2181,server3:2181 -p 8984
 ----
 ====
 
@@ -159,7 +159,7 @@ Windows::
 ====
 [source,powershell]
 ----
-C:\> bin\solr.cmd --solr-home cloud\node1 -z server1:2181,server2:2181,server3:2181
+bin\solr.cmd --solr-home cloud\node1 -z server1:2181,server2:2181,server3:2181
 
 ----
 ====
@@ -175,9 +175,9 @@ Customize the values for the parameters shown as needed and add any used in your
 *nix::
 +
 ====
-[source,terminal]
+[source,bash]
 ----
-$ bin/solr start -p 8984
+bin/solr start -p 8984
 ----
 ====
 
@@ -186,7 +186,7 @@ Windows::
 ====
 [source,powershell]
 ----
-C:\> bin\solr.cmd -p 8984
+bin\solr.cmd -p 8984
 ----
 ====
 ======
@@ -244,7 +244,7 @@ bin/solr create -c mycollection --shards 2
 Windows::
 +
 ====
-[source,text]
+[source,powershell]
 ----
 bin\solr.cmd create -c mycollection --shards 2
 ----
@@ -257,7 +257,7 @@ The `create` action will pass the `SOLR_SSL_*` properties set in your include fi
 
 To get the resulting cluster status (again, if you have not enabled client authentication, remove the `-E solr-ssl.pem:secret` option):
 
-[source,terminal]
+[source,bash]
 ----
 curl -E solr-ssl.pem:secret --cacert solr-ssl.pem "https://localhost:8984/solr/admin/collections?action=CLUSTERSTATUS&indent=on"
 ----
@@ -301,9 +301,9 @@ You should get a response that looks like this:
 
 Use `bin/solr post` to index some example documents to the SolrCloud collection created above:
 
-[source,console]
+[source,bash]
 ----
-$ bin/solr post --solr-url https://localhost:8984 --name mycollection example/exampledocs/*.xml
+bin/solr post --solr-url https://localhost:8984 --name mycollection example/exampledocs/*.xml
 ----
 
 === Query Using curl
@@ -311,7 +311,7 @@ $ bin/solr post --solr-url https://localhost:8984 --name mycollection example/ex
 Use curl to query the SolrCloud collection created above, from a directory containing the PEM formatted certificate and key created above (e.g., `example/etc/`).
 If you have not enabled client authentication (system property `-Djetty.ssl.clientAuth=true)`, then you can remove the `-E solr-ssl.pem:secret` option:
 
-[source,console]
+[source,bash]
 ----
 curl -E solr-ssl.pem:secret --cacert solr-ssl.pem "https://localhost:8984/solr/mycollection/select?q=*:*"
 ----
diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/installing-solr.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/installing-solr.adoc
index 2f8b7f0550b..5808c53dbd7 100644
--- a/solr/solr-ref-guide/modules/deployment-guide/pages/installing-solr.adoc
+++ b/solr/solr-ref-guide/modules/deployment-guide/pages/installing-solr.adoc
@@ -171,7 +171,7 @@ bin/solr start
 
 If you are running Windows, you can start Solr by running `bin\solr.cmd` instead.
 
-[source,plain]
+[source,powershell]
 ----
 bin\solr.cmd start
 ----
diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/node-roles.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/node-roles.adoc
index 07dab503bdd..ae4825a988a 100644
--- a/solr/solr-ref-guide/modules/deployment-guide/pages/node-roles.adoc
+++ b/solr/solr-ref-guide/modules/deployment-guide/pages/node-roles.adoc
@@ -107,7 +107,7 @@ Dedicated *`coordinator`* nodes can be provisioned with enough memory but very l
 Fetches the list of supported roles and their supported modes for this cluster.
 
 *Input*
-[source,text]
+[source,bash]
 ----
 curl http://localhost:8983/api/cluster/node-roles/supported
 ----
@@ -135,7 +135,7 @@ curl http://localhost:8983/api/cluster/node-roles/supported
 Fetches the current node roles assignment for all the nodes in the cluster.
 
 *Input*
-[source,text]
+[source,bash]
 ----
 curl http://localhost:8983/api/cluster/node-roles
 ----
@@ -206,7 +206,7 @@ http://localhost:8983/api/cluster/node-roles/role/data/off
 Fetches the current node roles assignment for the specified node.
 
 *Input*
-[source,text]
+[source,bash]
 ----
 curl http://localhost:8983/api/cluster/node-roles/node/solr1:8983_solr
 ----
diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/solr-control-script-reference.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/solr-control-script-reference.adoc
index 16280cd1d17..296dfc809f8 100644
--- a/solr/solr-ref-guide/modules/deployment-guide/pages/solr-control-script-reference.adoc
+++ b/solr/solr-ref-guide/modules/deployment-guide/pages/solr-control-script-reference.adoc
@@ -456,7 +456,7 @@ Stop Solr with verbose messages from this script.
 
 The `--version` command simply returns the version of Solr currently installed and immediately exists.
 
-[source,bash]
+[source,console]
 ----
 $ bin/solr --version
 X.Y.0
@@ -519,7 +519,7 @@ ERROR: Directory /opt/bin/solr does not exist.
 
 The basic usage of `bin/solr assert` is:
 
-[source, plain]
+[source,console]
 ----
 $ bin/solr assert -h
 usage: bin/solr assert [--cloud <url>] [--exists <directory>] [--exitcode] [-h] [--message <message>] [--not-cloud
@@ -1217,7 +1217,7 @@ The operations are available as sub-commands, which each have their own set of o
 
 The basic usage of bin/solr zk is:
 
-[source,plain]
+[source,console]
 ----
 $ bin/solr zk -h
 Usage: solr zk upconfig|downconfig -d <confdir> -n <configName> [-z zkHost] [-s solrUrl]
@@ -1934,35 +1934,35 @@ Notice the different endpoints used depending on the format.
 
 First export the documents, making sure to ignore any fields that are populated via a `copyField` by specifying what fields you want to export:
 
-[,console]
+[,bash]
 ----
-$ bin/solr export --solr-url http://localhost:8983 -c gettingstarted --fields id,name,manu,cat,features
+bin/solr export --solr-url http://localhost:8983 -c gettingstarted --fields id,name,manu,cat,features
 ----
 
 Create a new collection to import the exported documents into:
 
-[,console]
+[,bash]
 ----
-$ bin/solr create -c test_collection -n techproducts
+bin/solr create -c test_collection -n techproducts
 ----
 
 Now import the data with either of these methods:
 
-[,console]
+[,bash]
 ----
 curl 'http://localhost:8983/solr/test_collection/update/json/docs?commit=true' --header "Content-Type: application/json" -d @gettingstarted.json
 ----
 or
-[,console]
+[,bash]
 ----
 curl 'http://localhost:8983/solr/test_collection/update?commit=true' -H 'Content-Type: application/json' -d @gettingstarted.json
 ----
 
 *Example: import `javabin` files*
 
-[,console]
+[,bash]
 ----
-$ bin/solr export --solr-url http://localhost:8983 -c gettingstarted --format javabin --fields id,name,manu,cat,features
+bin/solr export --solr-url http://localhost:8983 -c gettingstarted --format javabin --fields id,name,manu,cat,features
 curl 'http://localhost:8983/solr/test_collection/update?commit=true' --header "Content-Type: application/javabin" --data-binary @gettingstarted.javabin
 ----
 
@@ -2035,36 +2035,36 @@ Learn more about on the xref:backup-restore.adoc[Backup and Restore] and xref:co
 
 To create a snapshot you just give it the collection and the name you want:
 
-[,console]
+[,bash]
 ----
-$  bin/solr snapshot-create -c <collection-name> --snapshot-name <snapshot-name>
+ bin/solr snapshot-create -c <collection-name> --snapshot-name <snapshot-name>
 ----
 
 === List all available snapshots
 
 To list all the snapshots that have been taken for a collection:
 
-[,console]
+[,bash]
 ----
-$ bin/solr snapshot-list -c <collection-name>
+bin/solr snapshot-list -c <collection-name>
 ----
 
 === Detailed information about a Snapshot
 
 Use the describe command to gain detailed information about a specific snapshot:
 
-[,console]
+[,bash]
 ----
-$ bin/solr snapshot-describe -c <collection-name> --snapshot-name <snapshot-name>
+bin/solr snapshot-describe -c <collection-name> --snapshot-name <snapshot-name>
 ----
 
 === Converting a Snapshot to a Backup
 
 Use the export command to take :
 
-[,console]
+[,bash]
 ----
-$ bin/solr snapshot-export [--backup-repo-name <DIR>] -c <NAME> --dest-dir <DIR> [--async-id <ID>] --snapshot-name <NAME>
+bin/solr snapshot-export [--backup-repo-name <DIR>] -c <NAME> --dest-dir <DIR> [--async-id <ID>] --snapshot-name <NAME>
 ----
 
 The `--async-id` parameter specifies that this is an asynchronous process.
@@ -2074,7 +2074,7 @@ The `--async-id` parameter specifies that this is an asynchronous process.
 
 Use the delete command to delete a snapshot :
 
-[,console]
+[,bash]
 ----
-$ bin/solr snapshot-delete -c <NAME> --snapshot-name <NAME>
+bin/solr snapshot-delete -c <NAME> --snapshot-name <NAME>
 ----
diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/system-requirements.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/system-requirements.adoc
index 7bc04774a70..7413835fde4 100644
--- a/solr/solr-ref-guide/modules/deployment-guide/pages/system-requirements.adoc
+++ b/solr/solr-ref-guide/modules/deployment-guide/pages/system-requirements.adoc
@@ -30,7 +30,7 @@ Solr is tested on several versions of Linux, macOS and Windows.
 You will need the Java Runtime Environment (JRE) version 21 or higher.
 At a command line, check your Java version like this:
 
-[source,bash]
+[source,console]
 ----
 $ java -version
 openjdk version "11.0.14.1" 2022-02-08
diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/zookeeper-access-control.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/zookeeper-access-control.adoc
index b7b095c4bd8..ea991101d97 100644
--- a/solr/solr-ref-guide/modules/deployment-guide/pages/zookeeper-access-control.adoc
+++ b/solr/solr-ref-guide/modules/deployment-guide/pages/zookeeper-access-control.adoc
@@ -434,7 +434,7 @@ Then run the command below appropriate for your operating system:
 ====
 [source,bash]
 ----
-$ bin/solr zk updateacls /zk-path
+bin/solr zk updateacls /zk-path
 ----
 ====
 
@@ -443,7 +443,7 @@ Windows::
 ====
 [source,powershell]
 ----
-$ bin/solr.cmd zk updateacls /zk-path
+bin/solr.cmd zk updateacls /zk-path
 ----
 ====
 ======
diff --git a/solr/solr-ref-guide/modules/getting-started/pages/solr-tutorial.adoc b/solr/solr-ref-guide/modules/getting-started/pages/solr-tutorial.adoc
index 4f3a1f333ff..da8764cdf5e 100644
--- a/solr/solr-ref-guide/modules/getting-started/pages/solr-tutorial.adoc
+++ b/solr/solr-ref-guide/modules/getting-started/pages/solr-tutorial.adoc
@@ -92,10 +92,10 @@ Nice work!
 As you work through this tutorial, you may want to stop Solr and reset the environment back to the starting point.
 The following command line will stop Solr and remove the directories for each of the two nodes that were created all the way back in Exercise 1:
 
-[,console]
+[,bash]
 ----
-$ bin/solr stop --all
-$ rm -Rf example/cloud/
+bin/solr stop --all
+rm -Rf example/cloud/
 ----
 
 == Where to next?
diff --git a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-aws.adoc b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-aws.adoc
index b1d07c5516d..5dcdd2bbeb2 100644
--- a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-aws.adoc
+++ b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-aws.adoc
@@ -123,27 +123,27 @@ You cannot use the instances until they become *“running”*.
 +
 Using SSH, if your AWS identity key file is `aws-key.pem` and the AMI uses `ec2-user` as login user, on each AWS instance, do the following:
 +
-[,console]
+[,bash]
 ----
-$ ssh-add aws-key.pem
-$ ssh -A ec2-user@<instance-public-dns>
+ssh-add aws-key.pem
+ssh -A ec2-user@<instance-public-dns>
 ----
 +
 . While logged in to each of the AWS EC2 instances, configure Java 21 and download Solr:
 +
-[,console]
+[,bash]
 ----
 # check if the AWS instance already has java installed
-$ java -version
+java -version
 
 # install JDK 21
-$ sudo yum install java-21
+sudo yum install java-21
 
 # configure JDK 21 as the default
-$ sudo /usr/sbin/alternatives --config java
+sudo /usr/sbin/alternatives --config java
 
 # verify that the default java version is now 21
-$ java -version
+java -version
 ----
 +
 [,console,subs="attributes"]
@@ -201,22 +201,22 @@ See xref:deployment-guide:securing-solr.adoc#network-configuration[Network Confi
 +
 Inside the `ec2-101-1-2-3.us-east-2.compute.amazonaws.com` (`solr-node-1`)
 +
-[,console]
+[,bash]
 ----
-$ cd $SOLR_HOME
+cd $SOLR_HOME
 
 # start Solr node on 8983 and ZooKeeper will start on 9983 (8983+1000)
-$ bin/solr start -p 8983 --host solr-node-1
+bin/solr start -p 8983 --host solr-node-1
 ----
 +
 On the other node, `ec2-101-4-5-6.us-east-2.compute.amazonaws.com` (`solr-node-2`)
 +
-[,console]
+[,bash]
 ----
-$ cd $SOLR_HOME
+cd $SOLR_HOME
 
 # start Solr node on 8983 and connect to ZooKeeper running on first node
-$ bin/solr start -p 8983 --host solr-node-2 -z solr-node-1:9983
+bin/solr start -p 8983 --host solr-node-2 -z solr-node-1:9983
 ----
 
 . Inspect and Verify.
@@ -263,13 +263,13 @@ See the section xref:deployment-guide:zookeeper-ensemble.adoc[] for information
 In this example we're using ZooKeeper v{dep-version-zookeeper}.
 On the node you're using to host ZooKeeper (`zookeeper-node`), download the package and untar it:
 +
-[,console,subs="attributes"]
+[,bash,subs="attributes"]
 ----
 # download stable version of ZooKeeper
-$ wget https://archive.apache.org/dist/zookeeper/zookeeper-{dep-version-zookeeper}/apache-zookeeper-{dep-version-zookeeper}-bin.tar.gz
+wget https://archive.apache.org/dist/zookeeper/zookeeper-{dep-version-zookeeper}/apache-zookeeper-{dep-version-zookeeper}-bin.tar.gz
 
 # untar the archive
-$ tar -zxvf apache-zookeeper-{dep-version-zookeeper}-bin.tar.gz
+tar -zxvf apache-zookeeper-{dep-version-zookeeper}-bin.tar.gz
 ----
 +
 Add an environment variable for ZooKeeper's home directory (`ZOO_HOME`) to the `.bashrc` for the user who will be running the process.
@@ -278,7 +278,7 @@ Correct the path to the ZooKeeper installation as appropriate if where you put i
 +
 [source,bash,subs="attributes"]
 ----
-$ export ZOO_HOME=$PWD/apache-zookeeper-{dep-version-zookeeper}-bin
+export ZOO_HOME=$PWD/apache-zookeeper-{dep-version-zookeeper}-bin
 
 # put the env variable in .bashrc
 # vim ~/.bashrc
@@ -286,20 +286,20 @@ export ZOO_HOME=/home/ec2-user/apache-zookeeper-{dep-version-zookeeper}-bin
 ----
 . Change directories to `ZOO_HOME`, and create the ZooKeeper configuration by using the template provided by ZooKeeper.
 +
-[,console]
+[,bash]
 ----
-$ cd $ZOO_HOME
+cd $ZOO_HOME
 
 # create ZooKeeper config by using zoo_sample.cfg
-$ cp conf/zoo_sample.cfg conf/zoo.cfg
+cp conf/zoo_sample.cfg conf/zoo.cfg
 ----
 . Create the ZooKeeper data directory in the filesystem, and edit the `zoo.cfg` file to uncomment the autopurge parameters and define the location of the data directory.
 +
 [source,bash]
 ----
 # create data dir for ZooKeeper, edit zoo.cfg, uncomment autopurge parameters
-$ mkdir data
-$ vim conf/zoo.cfg
+mkdir data
+vim conf/zoo.cfg
 
 # -- uncomment --
 autopurge.snapRetainCount=3
@@ -313,32 +313,32 @@ dataDir=data
 ----
 . Start ZooKeeper.
 +
-[,console]
+[,bash]
 ----
-$ cd $ZOO_HOME
+cd $ZOO_HOME
 
 # start ZooKeeper, default port: 2181
-$ bin/zkServer.sh start
+bin/zkServer.sh start
 ----
 
 . On the first node being used for Solr (`solr-node-1`), start Solr and tell it where to find ZooKeeper.
 +
-[,console]
+[,bash]
 ----
-$ cd $SOLR_HOME
+cd $SOLR_HOME
 
 # start Solr node on 8983 and connect to ZooKeeper running on ZooKeeper node
-$ bin/solr start -p 8983 --host solr-node-1 -z zookeeper-node:2181
+bin/solr start -p 8983 --host solr-node-1 -z zookeeper-node:2181
 ----
 +
 . On the second Solr node (`solr-node-2`), again start Solr and tell it where to find ZooKeeper.
 +
-[,console]
+[,bash]
 ----
-$ cd $SOLR_HOME
+cd $SOLR_HOME
 
 # start Solr node on 8983 and connect to ZooKeeper running on ZooKeeper node
-$ bin/solr start -p 8983 --host solr-node-2 -z zookeeper-node:2181
+bin/solr start -p 8983 --host solr-node-2 -z zookeeper-node:2181
 ----
 
 [TIP]
diff --git a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-diy.adoc b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-diy.adoc
index 2fa35587de9..6bf3aed867f 100644
--- a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-diy.adoc
+++ b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-diy.adoc
@@ -44,7 +44,7 @@ docker run --rm -p 9998:9998 --name tika -d apache/tika:3.2.3.0-full
 
 === Start Solr with the extraction module enabled
 
-[,console]
+[,bash]
 ----
 # Stop Solr if it is running
 bin/solr stop --all
@@ -58,9 +58,9 @@ bin/solr start -Dsolr.modules=extraction
 Before you get started, create a new collection, named whatever you'd like.
 In this example, the collection will be named "localDocs"; replace that name with whatever name you choose if you want to.
 
-[,console]
+[,bash]
 ----
-$ bin/solr create -c localDocs --shards 2 -rf 2
+bin/solr create -c localDocs --shards 2 -rf 2
 ----
 
 Again, as we saw from Exercise 2 above, this will use the `_default` configset and all the schemaless features it provides.
@@ -71,7 +71,7 @@ You may need to iterate on indexing a few times before you get the schema right.
 
 Add the /update/extract handler to your collection, pointing to the Tika Server you just started
 
-[,console]
+[,bash]
 ----
 curl 'http://localhost:8983/solr/localDocs/config' -H 'Content-type:application/json' -d '{
   "add-requesthandler": {
@@ -97,9 +97,9 @@ We used only JSON, XML and CSV in our exercises, but the Post command can also h
 In this example, assume there is a directory named "Documents" locally.
 To index it, we would issue a command like this (correcting the collection name after the `-c` parameter as needed):
 +
-[,console]
+[,bash]
 ----
-$ bin/solr post -c localDocs ~/Documents
+bin/solr post -c localDocs ~/Documents
 ----
 +
 You may get errors as it works through your documents.
@@ -140,16 +140,16 @@ We can use `bin/solr post` to delete documents also if we structure the request
 
 Execute the following command to delete a specific document:
 
-[,console]
+[,bash]
 ----
-$ bin/solr post -c localDocs --mode args "{delete: {id:'SP2514N'}}"
+bin/solr post -c localDocs --mode args "{delete: {id:'SP2514N'}}"
 ----
 
 To delete all documents, you can use "delete-by-query" command like:
 
-[,console]
+[,bash]
 ----
-$ bin/solr post -c localDocs --mode args "{delete: {query:'*:*'}}"
+bin/solr post -c localDocs --mode args "{delete: {query:'*:*'}}"
 ----
 
 You can also modify the above to only delete documents that match a specific query.
diff --git a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-films.adoc b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-films.adoc
index 39816098cc2..4a321e45cd9 100644
--- a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-films.adoc
+++ b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-films.adoc
@@ -30,17 +30,17 @@ Then go ahead to the next section.
 
 If you did, though, and need to restart Solr, issue these commands:
 
-[,console]
+[,bash]
 ----
-$ bin/solr start -p 8983 --solr-home example/cloud/node1/solr
+bin/solr start -p 8983 --solr-home example/cloud/node1/solr
 ----
 
 This starts the first node.
 When it's done start the second node, and tell it how to connect to ZooKeeper:
 
-[,console]
+[,bash]
 ----
-$ bin/solr start -p 7574 --solr-home example/cloud/node2/solr -z localhost:9983
+bin/solr start -p 7574 --solr-home example/cloud/node2/solr -z localhost:9983
 ----
 
 NOTE: If you have defined `ZK_HOST` in `solr.in.sh`/`solr.in.cmd` (see xref:deployment-guide:zookeeper-ensemble#updating-solr-include-files[Updating Solr Include Files]) you can omit `-z <zk host string>` from the above command.
@@ -73,9 +73,9 @@ This time, we're going to use a configset that has a very minimal schema and let
 
 The data you're going to index is related to movies, so start by creating a collection named "films" that uses the `_default` configset:
 
-[,console]
+[,bash]
 ----
-$ bin/solr create -c films --shards 2 --replication-factor 2
+bin/solr create -c films --shards 2 --replication-factor 2
 ----
 
 Whoa, wait.
@@ -88,7 +88,7 @@ This is equivalent to the options we had during the interactive example from the
 
 You should see output like:
 
-[,console]
+[,text]
 ----
 WARNING: Using _default configset. Data driven schema functionality is enabled by default, which is
          NOT RECOMMENDED for production use.
@@ -166,7 +166,7 @@ That's not going to get us very far.
 What we can do is set up the "name" field in Solr before we index the data to be sure Solr always interprets it as a string.
 At the command line, enter this curl command:
 
-[,console]
+[,bash]
 ----
 curl 'http://localhost:8983/solr/films/schema' -H 'Content-type:application/json' --data-binary '{"add-field": {"name":"name", "type":"text_general", "multiValued":false, "stored":true}}'
 ----
@@ -195,7 +195,7 @@ You can use either the Admin UI or the Schema API for this.
 
 At the command line, use the Schema API again to define a copy field:
 
-[,console]
+[,bash]
 ----
 curl 'http://localhost:8983/solr/films/schema' -H 'Content-type:application/json' --data-binary '{"add-copy-field" : {"source":"*","dest":"_text_"}}'
 ----
@@ -217,34 +217,36 @@ OK, now we're ready to index the data and start playing around with it.
 
 The films data we will index is located in the `example/films` directory of your installation.
 It comes in three formats: JSON, XML and CSV.
-Pick one of the formats and index it into the "films" collection (in each example, one command is for Unix/MacOS and the other is for Windows):
+Pick one of the formats and index it into the "films" collection:
 
-.To Index JSON Format
-[tabs#index-json]
+[tabs#index-film-data]
 ======
+JSON::
++
+====
+[source,bash]
 ----
-$ bin/solr post -c films example/films/films.json
+bin/solr post -c films example/films/films.json
 ----
-======
+====
 
-
-.To Index XML Format
-[tabs#index-xml]
-======
-[,console]
+XML::
++
+====
+[source,bash]
 ----
-$ bin/solr post -c films example/films/films.xml
+bin/solr post -c films example/films/films.xml
 ----
-======
-
+====
 
-.To Index CSV Format
-[tabs#index-csv]
-======
-[,console]
+CSV::
++
+====
+[source,bash]
 ----
-$ bin/solr post -c films example/films/films.csv --params "f.genre.split=true&f.directed_by.split=true&f.genre.separator=|&f.directed_by.separator=|"
+bin/solr post -c films example/films/films.csv --params "f.genre.split=true&f.directed_by.split=true&f.genre.separator=|&f.directed_by.separator=|"
 ----
+====
 ======
 
 Each command includes these main parameters:
@@ -299,7 +301,7 @@ To see facet counts from all documents (`q=\*:*`): turn on faceting (`facet=true
 If you only want facets, and no document contents, specify `rows=0`.
 The `curl` command below will return facet counts for the `genre_str` field:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/films/select?q=\*:*&rows=0&facet=true&facet.field=genre_str"
 ----
@@ -340,7 +342,7 @@ Or, perhaps you do want all the facets, and you'll let your application's front-
 
 If you wanted to control the number of items in a bucket, you could do something like this:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/films/select?=&q=\*:*&facet.field=genre_str&facet.mincount=200&facet=on&rows=0"
 ----
@@ -360,7 +362,7 @@ The Solr Admin UI doesn't yet support range facet options, so you will need to u
 
 If we construct a query that looks like this:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/films/select?q=*:*&rows=0\
 &facet=true\
@@ -430,7 +432,7 @@ Another faceting type is pivot facets, also known as "decision trees", allowing
 Using the films data, pivot facets can be used to see how many of the films in the "Drama" category (the `genre_str` field) are directed by a director.
 Here's how to get at the raw data for this scenario:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/films/select?q=\*:*&rows=0&facet=on&facet.pivot=genre_str,directed_by_str"
 ----
@@ -486,7 +488,7 @@ Like our previous exercise, this data may not be relevant to your needs.
 We can clean up our work by deleting the collection.
 To do that, issue this command at the command line:
 
-[,console]
+[,bash]
 ----
-$ bin/solr delete -c films
+bin/solr delete -c films
 ----
diff --git a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-five-minutes.adoc b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-five-minutes.adoc
index fe9698e7ee5..be4c3370177 100644
--- a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-five-minutes.adoc
+++ b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-five-minutes.adoc
@@ -24,9 +24,9 @@ To launch Solr, run: `bin/solr start` on Unix or MacOS; `bin\solr.cmd start` on
 
 To start another Solr node and have it join the cluster alongside the first node,
 
-[,console]
+[,bash]
 ----
-$ bin/solr start -z localhost:9983 -p 8984
+bin/solr start -z localhost:9983 -p 8984
 ----
 
 
@@ -34,7 +34,7 @@ $ bin/solr start -z localhost:9983 -p 8984
 
 Like a database system holds data in tables, Solr holds data in collections. A collection can be created as follows:
 
-[,console]
+[,bash]
 ----
 curl --request POST \
 --url http://localhost:8983/api/collections \
@@ -50,7 +50,7 @@ curl --request POST \
 
 Let us define some of the fields that our documents will contain.
 
-[,console]
+[,bash]
 ----
 curl --request POST \
   --url http://localhost:8983/api/collections/techproducts/schema \
@@ -74,7 +74,7 @@ curl --request POST \
 
 A single document can be indexed as:
 
-[,console]
+[,bash]
 ----
 curl --request POST \
   --url 'http://localhost:8983/api/collections/techproducts/update' \
@@ -95,7 +95,7 @@ curl --request POST \
 
 Multiple documents can be indexed in the same request:
 
-[,console]
+[,bash]
 ----
 curl --request POST \
   --url 'http://localhost:8983/api/collections/techproducts/update' \
@@ -131,7 +131,7 @@ curl --request POST \
 
 A file containing the documents can be indexed as follows:
 
-[,console]
+[,bash]
 ----
 curl -H "Content-Type: application/json" \
        -X POST \
@@ -142,7 +142,7 @@ curl -H "Content-Type: application/json" \
 == Commit the Changes
 After documents are indexed into a collection, they are not immediately available for searching. In order to have them searchable, a commit operation (also called `refresh` in other search engines like OpenSearch etc.) is needed. Commits can be scheduled at periodic intervals using auto-commits as follows.
 
-[,console]
+[,bash]
 ----
 curl 'http://localhost:8983/api/collections/techproducts/config' -H 'Content-type: application/json' -d '{"set-property":{"updateHandler.autoCommit.maxTime":15000}}'
 ----
@@ -150,7 +150,7 @@ curl 'http://localhost:8983/api/collections/techproducts/config' -H 'Content-typ
 == Make some Basic search queries
 You can now try searching your documents like:
 
-[source]
+[source,bash]
 ----
 curl 'http://localhost:8983/solr/techproducts/select?q=name%3Alightning'
 ----
diff --git a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-opennlp.adoc b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-opennlp.adoc
index bb39d6fb5d2..b31430a6c60 100644
--- a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-opennlp.adoc
+++ b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-opennlp.adoc
@@ -36,10 +36,10 @@ It predicts the sentiment of the review as a number of stars (between 1 and 5).
 
 To enable NLP processing in Solr, start Solr with the `analysis-extras` module and package support:
 
-[,console]
+[,bash]
 ----
-$ export SOLR_SECURITY_MANAGER_ENABLED=false
-$ bin/solr start -m 4g -Dsolr.modules=analysis-extras -Dsolr.packages.enabled=true
+export SOLR_SECURITY_MANAGER_ENABLED=false
+bin/solr start -m 4g -Dsolr.modules=analysis-extras -Dsolr.packages.enabled=true
 ----
 
 [NOTE]
@@ -56,11 +56,11 @@ For sentiment analysis, we need two essential files:
 
 Let's create a directory for our models and download them:
 
-[,console]
+[,bash]
 ----
-$ mkdir -p ./downloads/sentiment/
-$ wget -O ./downloads/sentiment/model.onnx https://huggingface.co/onnx-community/bert-base-multilingual-uncased-sentiment-ONNX/resolve/main/onnx/model_quantized.onnx
-$ wget -O ./downloads/sentiment/vocab.txt https://huggingface.co/onnx-community/bert-base-multilingual-uncased-sentiment-ONNX/raw/main/vocab.txt
+mkdir -p ./downloads/sentiment/
+wget -O ./downloads/sentiment/model.onnx https://huggingface.co/onnx-community/bert-base-multilingual-uncased-sentiment-ONNX/resolve/main/onnx/model_quantized.onnx
+wget -O ./downloads/sentiment/vocab.txt https://huggingface.co/onnx-community/bert-base-multilingual-uncased-sentiment-ONNX/raw/main/vocab.txt
 ----
 
 If you do not have `wget` installed you will need to adjust the above command or download manually.
@@ -81,16 +81,16 @@ Learn more about ONNX at https://onnx.ai[onnx.ai^, role="external", window="_bla
 
 Create a new collection for our sentiment analysis experiments:
 
-[,console]
+[,bash]
 ----
-$ bin/solr create -c sentiment
+bin/solr create -c sentiment
 ----
 
 === Step 4: Configure the Schema
 
 We need to add fields to our schema to store both the input text and the sentiment classification results:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/sentiment/schema" -H 'Content-type:application/json' --data-binary '{
   "add-field":{
@@ -100,7 +100,7 @@ curl "http://localhost:8983/solr/sentiment/schema" -H 'Content-type:application/
 }'
 ----
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/sentiment/schema" -H 'Content-type:application/json' --data-binary '{
   "add-field":{
@@ -114,12 +114,12 @@ curl "http://localhost:8983/solr/sentiment/schema" -H 'Content-type:application/
 
 Solr's FileStore provides a distributed file storage mechanism for SolrCloud. Upload our model files there:
 
-[,console]
+[,bash]
 ----
 curl --data-binary @./downloads/sentiment/vocab.txt -X PUT "http://localhost:8983/api/cluster/filestore/files/models/sentiment/vocab.txt"
 ----
 
-[,console]
+[,bash]
 ----
 curl --data-binary @./downloads/sentiment/model.onnx -X PUT "http://localhost:8983/api/cluster/filestore/files/models/sentiment/model.onnx"
 ----
@@ -136,7 +136,7 @@ When you reference these files in configuration, you use paths relative to the F
 
 Now we'll configure the update processor that will analyze sentiment during document indexing:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/sentiment/config" -H 'Content-type:application/json' -d '{
   "add-updateprocessor": {
@@ -178,7 +178,7 @@ This configuration creates an update processor that:
 
 Let's index some sample documents to see the sentiment analysis in action:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/sentiment/update/json?processor=sentimentClassifier&commit=true" -H 'Content-type:application/json' -d '[
   {
@@ -198,7 +198,7 @@ Notice that we specify the processor name with `processor=sentimentClassifier` i
 
 Query the documents to see the sentiment classifications:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/sentiment/select?q=id:good"
 ----
@@ -220,7 +220,7 @@ You should see the positive review classified as "very good":
 
 Check the negative review:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/sentiment/select?q=id:bad"
 ----
@@ -355,7 +355,7 @@ For a permanent configuration, define an update processor chain in `solrconfig.x
 
 You can then use this chain by default or explicitly reference it when indexing:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/sentiment/update/json?update.chain=sentiment-analysis-chain" -d '...'
 ----
@@ -366,7 +366,7 @@ curl "http://localhost:8983/solr/sentiment/update/json?update.chain=sentiment-an
 
 Create facets based on sentiment to understand opinion distribution:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/sentiment/select?q=*:*&facet=true&facet.field=name_sentiment"
 ----
@@ -375,7 +375,7 @@ curl "http://localhost:8983/solr/sentiment/select?q=*:*&facet=true&facet.field=n
 
 Filter search results to show only documents with specific sentiment:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/sentiment/select?q=product_type:electronics&fq=name_sentiment:very%20good"
 ----
@@ -384,7 +384,7 @@ curl "http://localhost:8983/solr/sentiment/select?q=product_type:electronics&fq=
 
 Boost documents with positive sentiment in search results:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/sentiment/select?q=*:*&defType=edismax&bq=name_sentiment:very%20good^5.0"
 ----
@@ -393,7 +393,7 @@ curl "http://localhost:8983/solr/sentiment/select?q=*:*&defType=edismax&bq=name_
 
 Analyze sentiment trends over time using time-based queries and facets:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/sentiment/select?q=*:*&facet=true&facet.range=timestamp&facet.range.start=NOW/DAY-30DAY&facet.range.end=NOW&facet.range.gap=%2B1DAY&facet.pivot=timestamp,name_sentiment"
 ----
@@ -457,7 +457,7 @@ This integration demonstrates how Solr can leverage modern NLP capabilities to e
 
 When you're done with this tutorial, stop Solr:
 
-[,console]
+[,bash]
 ----
-$ bin/solr stop --all
+bin/solr stop --all
 ----
diff --git a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-paramsets.adoc b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-paramsets.adoc
index 797c21ca4ec..645e19fc7e4 100644
--- a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-paramsets.adoc
+++ b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-paramsets.adoc
@@ -30,15 +30,15 @@ Then go ahead to the next section.
 
 === Create a New Collection
 
-[,console]
+[,bash]
 ----
-$ bin/solr create -c films
+bin/solr create -c films
 ----
 
 Because we didn't specify a ConfigSet, we will end up using the `_default` ConfigSet.
 We'll specify the specific schema for a couple of fields that Solr would otherwise guess differently (than we'd like) about:
 
-[,console]
+[,bash]
 ----
 curl http://localhost:8983/solr/films/schema -H 'Content-type:application/json' --data-binary '{
   "add-field" : [
@@ -69,9 +69,9 @@ and for the release date also to be single valued.
 
 Now that we have updated our Schema, we need to index the sample film data, or, if you already have indexed it, then re-index it to take advantage of the new field definitions we added.  
 
-[,console]
+[,bash]
 ----
-$ bin/solr post -c films example/films/films.json
+bin/solr post -c films example/films/films.json
 ----
 
 === Let's get Searching!
@@ -87,14 +87,14 @@ http://localhost:8983/solr/films/query?q=name:batman
 
 Show me all 'Super hero' movies:
 
-[,console]
+[,bash]
 ----
 curl 'http://localhost:8983/solr/films/query?q=*:*&fq=genre:"Superhero movie"'
 ----
 
 Let's see the distribution of genres across all the movies. See the facet section of the response for the counts:
 
-[,console]
+[,bash]
 ----
 curl 'http://localhost:8983/solr/films/query?q=*:*&facet=true&facet.field=genre'
 ----
@@ -113,7 +113,7 @@ That is clearly not related to any Harry Potter movies.
 Let's set up two relevancy algorithms, using our APIs, and then compare the quality of the results.
 Algorithm *A* will specify using `dismax` and a `qf` parameter, while Algorithm *B* will use `dismax`, `qf` and a must match `mm` set to 100%.
 
-[,console]
+[,bash]
 ----
 curl http://localhost:8983/solr/films/config/params -H 'Content-type:application/json' --data-binary '{
 "set": {
diff --git a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-solrcloud.adoc b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-solrcloud.adoc
index 348dfeee00a..19267149053 100644
--- a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-solrcloud.adoc
+++ b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-solrcloud.adoc
@@ -50,16 +50,16 @@ For more details see the section xref:deployment-guide:securing-solr.adoc#networ
 The `bin/solr` script makes it easy to get started with SolrCloud as it walks you through the process of launching Solr nodes in SolrCloud mode and adding a collection.
 To get started, simply do:
 
-[,console]
+[,bash]
 ----
-$ bin/solr start -e cloud
+bin/solr start -e cloud
 ----
 
 This starts an interactive session to walk you through the steps of setting up a simple SolrCloud cluster with embedded ZooKeeper.
 
 The script starts by asking you how many Solr nodes you want to run in your local cluster, with the default being 2.
 
-[console]
+[,text]
 ----
 Welcome to the SolrCloud example!
 
@@ -72,7 +72,7 @@ These nodes will each exist on a single machine, but will use different ports to
 
 Next, the script will prompt you for the port to bind each of the Solr nodes to, such as:
 
-[,console]
+[,text]
 ----
  Please enter the port for node1 [8983]
 ----
@@ -80,9 +80,9 @@ Next, the script will prompt you for the port to bind each of the Solr nodes to,
 Choose any available port for each node; the default for the first node is 8983 and 7574 for the second node.
 The script will start each node in order and show you the command it uses to start the server, such as:
 
-[,console]
+[,bash]
 ----
-$ bin/solr start --solr-home example/cloud/node1/solr -p 8983
+bin/solr start --solr-home example/cloud/node1/solr -p 8983
 ----
 
 The first node will also start an embedded ZooKeeper server bound to port 9983.
@@ -90,7 +90,7 @@ The Solr home for the first node is in `example/cloud/node1/solr` as indicated b
 
 After starting up all nodes in the cluster, the script prompts you for the name of the collection to create:
 
-[,console]
+[,text]
 ----
  Please provide a name for your new collection: [gettingstarted]
 ----
@@ -115,7 +115,7 @@ This can be done as follows (assuming your collection name is `mycollection`):
 V1 API::
 +
 ====
-[,console]
+[,bash]
 ----
 curl http://host:8983/solr/{collectionName}/config -d '{"set-user-property": {"update.autoCreateFields":"false"}}'
 ----
@@ -124,7 +124,7 @@ curl http://host:8983/solr/{collectionName}/config -d '{"set-user-property": {"u
 V2 API::
 +
 ====
-[,console]
+[,bash]
 ----
 curl http://host:8983/api/collections/{collectionName}/config -d '{"set-user-property": {"update.autoCreateFields":"false"}}'
 ----
@@ -134,9 +134,9 @@ curl http://host:8983/api/collections/{collectionName}/config -d '{"set-user-pro
 At this point, you should have a new collection created in your local SolrCloud cluster.
 To verify this, you can run the status command:
 
-[,console]
+[,bash]
 ----
-$ bin/solr status
+bin/solr status
 ----
 
 If you encounter any errors during this process, check the Solr log files in `example/cloud/node1/logs` and `example/cloud/node2/logs`.
@@ -144,9 +144,9 @@ If you encounter any errors during this process, check the Solr log files in `ex
 You can see how your collection is deployed across the cluster by visiting the cloud panel in the Solr Admin UI: http://localhost:8983/solr/#/~cloud.
 Solr also provides a way to perform basic diagnostics for a collection using the healthcheck command:
 
-[,console]
+[,bash]
 ----
-$ bin/solr healthcheck -c gettingstarted
+bin/solr healthcheck -c gettingstarted
 ----
 
 The healthcheck command gathers basic information about each replica in a collection, such as number of docs, current status (active, down, etc.), and address (where the replica lives in the cluster).
@@ -155,18 +155,18 @@ Documents can now be added to SolrCloud using the xref:indexing-guide:post-comma
 
 To stop Solr in SolrCloud mode, you would use the `bin/solr` script and issue the `stop` command, as in:
 
-[,console]
+[,bash]
 ----
-$ bin/solr stop --all
+bin/solr stop --all
 ----
 
 === Starting with --no-prompt
 
 You can also get SolrCloud started with all the defaults instead of the interactive session using the following command:
 
-[,console]
+[,bash]
 ----
-$ bin/solr start -e cloud --no-prompt
+bin/solr start -e cloud --no-prompt
 ----
 
 === Restarting Nodes
@@ -174,16 +174,16 @@ $ bin/solr start -e cloud --no-prompt
 You can restart your SolrCloud nodes using the `bin/solr` script.
 For instance, to restart node1 running on port 8983 (with an embedded ZooKeeper server), you would do:
 
-[,console]
+[,bash]
 ----
-$ bin/solr restart -p 8983 --solr-home example/cloud/node1/solr
+bin/solr restart -p 8983 --solr-home example/cloud/node1/solr
 ----
 
 To restart node2 running on port 7574, you can do:
 
-[,console]
+[,bash]
 ----
-$ bin/solr restart -p 7574 -z localhost:9983 --solr-home example/cloud/node2/solr
+bin/solr restart -p 7574 -z localhost:9983 --solr-home example/cloud/node2/solr
 ----
 
 Notice that you need to specify the ZooKeeper address (`-z localhost:9983`) when starting node2 so that it can join the cluster with node1.
@@ -193,20 +193,20 @@ Notice that you need to specify the ZooKeeper address (`-z localhost:9983`) when
 Adding a node to an existing cluster is a bit advanced and involves a little more understanding of Solr.
 Once you start a SolrCloud cluster using the startup scripts, you can add a new node to it by:
 
-[,console]
+[,bash]
 ----
-$ mkdir <solr.home for new Solr node>
-$ bin/solr start --solr-home <solr.home>/solr -p <port num> -z <zk hosts string>
+mkdir <solr.home for new Solr node>
+bin/solr start --solr-home <solr.home>/solr -p <port num> -z <zk hosts string>
 ----
 
 Notice that the above requires you to create a Solr home directory.
 
 Example (with directory structure) that adds a node to an example started with "bin/solr start -e cloud":
 
-[,console]
+[,bash]
 ----
-$ mkdir -p example/cloud/node3/solr
-$ bin/solr start --solr-home example/cloud/node3/solr -p 8987 -z localhost:9983
+mkdir -p example/cloud/node3/solr
+bin/solr start --solr-home example/cloud/node3/solr -p 8987 -z localhost:9983
 ----
 
 The previous command will start another Solr node on port 8987 with Solr home set to `example/cloud/node3/solr`.
diff --git a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-techproducts.adoc b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-techproducts.adoc
index dc93e58e971..e0b537d375d 100644
--- a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-techproducts.adoc
+++ b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-techproducts.adoc
@@ -40,7 +40,7 @@ The first prompt asks how many nodes we want to run.
 Note the `[2]` at the end of the last line; that is the default number of nodes.
 Two is what we want for this example, so you can simply press kbd:[enter].
 
-[,console]
+[,text]
 ----
 Ok, let's start up 2 Solr nodes for your example SolrCloud cluster.
 Please enter the port for node1 [8983]:
@@ -50,7 +50,7 @@ This will be the port that the first node runs on.
 Unless you know you have something else running on port 8983 on your machine, accept this default option also by pressing kbd:[enter].
 If something is already using that port, you will be asked to choose another port.
 
-[,console]
+[,text]
 ----
 Please enter the port for node2 [7574]:
 ----
@@ -62,7 +62,7 @@ If something is already using that port, you will be asked to choose another por
 Solr will now initialize itself and start running on those two nodes.
 The script will print the commands it uses for your reference.
 
-[,console]
+[,text]
 ----
 Starting up 2 Solr nodes for your example SolrCloud cluster.
 
@@ -91,7 +91,7 @@ Because we are starting in SolrCloud mode, and did not define any details about
 
 After startup is complete, you'll be prompted to create a collection to use for indexing data.
 
-[,console]
+[,text]
 ----
 Now let's create a new collection for indexing documents in your 2-node cluster.
 Please provide a name for your new collection: [gettingstarted]
@@ -102,7 +102,7 @@ This tutorial will ask you to index some sample data included with Solr, called
 Let's name our collection "techproducts" so it's easy to differentiate from other collections we'll create later.
 Enter `techproducts` at the prompt and hit kbd:[enter].
 
-[,console]
+[,text]
 ----
 How many shards would you like to split techproducts into? [2]
 ----
@@ -111,7 +111,7 @@ This is asking how many xref:solr-glossary.adoc#shard[shards] you want to split
 Choosing "2" (the default) means we will split the index relatively evenly across both nodes, which is a good way to start.
 Accept the default by hitting kbd:[enter].
 
-[,console]
+[,text]
 ----
 How many replicas per shard would you like to create? [2]
 ----
@@ -119,7 +119,7 @@ How many replicas per shard would you like to create? [2]
 A replica is a copy of the index that's used for failover (see also the xref:solr-glossary.adoc#replica[Solr Glossary definition]).
 Again, the default of "2" is fine to start with here also, so accept the default by hitting kbd:[enter].
 
-[,console]
+[,text]
 ----
 Please choose a configuration for the techproducts collection, available options are:
 _default or sample_techproducts_configs [_default]
@@ -135,7 +135,7 @@ This configset is specifically designed to support the sample data we want to us
 
 At this point, Solr will create the collection and again output to the screen the commands it issues.
 
-[,console]
+[,text]
 ----
 Created collection 'techproducts' with 2 shard(s), 2 replica(s) with config-set 'techproducts'
 
@@ -167,14 +167,14 @@ You'll need a command shell to run some of the following examples, rooted in the
 The data we will index is in the `example/exampledocs` directory.
 The documents are in a mix of document formats (JSON, CSV, etc.), and fortunately we can index them all at once:
 
-[,console]
+[,bash]
 ----
-$ bin/solr post -c techproducts example/exampledocs/*
+bin/solr post -c techproducts example/exampledocs/*
 ----
 
 You should see output similar to the following:
 
-[,console]
+[,text]
 ----
 Posting files to [base] url http://localhost:8983/solr/techproducts/update...
 Entering auto mode. File endings considered are xml,json,jsonl,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,log
@@ -220,7 +220,7 @@ If you click on it, your browser will show you the raw response.
 
 To use curl, give the same URL shown in your browser in quotes on the command line:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/techproducts/select?indent=on&q=*:*"
 ----
@@ -241,7 +241,7 @@ Enter "foundation" and hit btn:[Execute Query] again.
 
 If you prefer curl, enter something like this:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/techproducts/select?q=foundation"
 ----
@@ -289,7 +289,7 @@ This is one of the available fields on the query form in the Admin UI.
 Put "id" (without quotes) in the "fl" box and hit btn:[Execute Query] again.
 Or, specify it with curl:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/techproducts/select?q=foundation&fl=id"
 ----
@@ -386,7 +386,7 @@ For example, search for "CAS latency" by entering that phrase in quotes to the `
 
 If you're following along with curl, note that the space between terms must be converted to "+" in a URL, as so:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/techproducts/select?q=\"CAS+latency\""
 ----
@@ -447,7 +447,7 @@ To find documents that contain both terms "electronics" and "music", enter `+ele
 If you're using curl, you must encode the `+` character because it has a reserved purpose in URLs (encoding the space character).
 The encoding for `+` is `%2B` as in:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/techproducts/select?q=%2Belectronics%20%2Bmusic"
 ----
@@ -457,7 +457,7 @@ You should only get a single result.
 To search for documents that contain the term "electronics" but *don't* contain the term "music", enter `+electronics -music` in the `q` box in the Admin UI.
 For curl, again, URL encode `+` as `%2B` as in:
 
-[,console]
+[,bash]
 ----
 curl "http://localhost:8983/solr/techproducts/select?q=%2Belectronics+-music"
 ----
@@ -477,23 +477,23 @@ You can choose now to continue to the next example which will introduce more Sol
 If you decide not to continue with this tutorial, the data we've indexed so far is likely of little value to you.
 You can delete your installation and start over, or you can use the `bin/solr` script we started out with to delete this collection:
 
-[,console]
+[,bash]
 ----
-$ bin/solr delete -c techproducts
+bin/solr delete -c techproducts
 ----
 
 And then create a new collection:
 
-[,console]
+[,bash]
 ----
-$ bin/solr create -c <yourCollection> --shards 2 -rf 2
+bin/solr create -c <yourCollection> --shards 2 -rf 2
 ----
 
 To stop both of the Solr nodes we started, issue the command:
 
-[,console]
+[,bash]
 ----
-$ bin/solr stop --all
+bin/solr stop --all
 ----
 
 For more information on start/stop and collection options with `bin/solr`, see xref:deployment-guide:solr-control-script-reference.adoc[].
diff --git a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-vectors.adoc b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-vectors.adoc
index d131a6d3eff..982b5045b78 100644
--- a/solr/solr-ref-guide/modules/getting-started/pages/tutorial-vectors.adoc
+++ b/solr/solr-ref-guide/modules/getting-started/pages/tutorial-vectors.adoc
@@ -30,16 +30,16 @@ Then go ahead to the next section.
 
 === Preparing for the Vector data
 
-[,console]
+[,bash]
 ----
-$ bin/solr create -c films
+bin/solr create -c films
 ----
 
 Because we didn't specify a ConfigSet when we created the collection, we will use the `_default` ConfigSet.
 
 First we need to update our schema to add the vector field type, the field to hold the vector values and some supporting fields.
 
-[,console]
+[,bash]
 ----
 curl http://localhost:8983/solr/films/schema -H 'Content-type:application/json' --data-binary '{
   "add-field-type" : {
@@ -75,9 +75,9 @@ curl http://localhost:8983/solr/films/schema -H 'Content-type:application/json'
 
 We have the vectors embedded in our `films.json` file, so let's index that data, taking advantage of our new schema field we just defined.
 
-[,console]
+[,bash]
 ----
-$ bin/solr post -c films example/films/films.json
+bin/solr post -c films example/films/films.json
 ----
 
 === Let's do some Vector searches
diff --git a/solr/solr-ref-guide/modules/indexing-guide/pages/indexing-with-tika.adoc b/solr/solr-ref-guide/modules/indexing-guide/pages/indexing-with-tika.adoc
index 37929b3c419..614593cec23 100644
--- a/solr/solr-ref-guide/modules/indexing-guide/pages/indexing-with-tika.adoc
+++ b/solr/solr-ref-guide/modules/indexing-guide/pages/indexing-with-tika.adoc
@@ -143,9 +143,9 @@ Note this includes the path, so if you upload a different file, always be sure t
 
 You can also use `bin/solr post` to do the same thing:
 
-[,console]
+[,bash]
 ----
-$ bin/solr post -c gettingstarted example/exampledocs/solr-word.pdf --params "literal.id=doc1"
+bin/solr post -c gettingstarted example/exampledocs/solr-word.pdf --params "literal.id=doc1"
 ----
 
 Now you can execute a query and find that document with a request like `\http://localhost:8983/solr/gettingstarted/select?q=pdf`.
@@ -163,9 +163,9 @@ The dynamic field `ignored_*` is good for this purpose.
 For the fields you do want to map, explicitly set them using `fmap.IN=OUT` and/or ensure the field is defined in the schema.
 Here's an example:
 
-[,console]
+[,bash]
 ----
-$ bin/solr post -c gettingstarted example/exampledocs/solr-word.pdf --params "literal.id=doc1&uprefix=ignored_&fmap.last_modified=last_modified_dt"
+bin/solr post -c gettingstarted example/exampledocs/solr-word.pdf --params "literal.id=doc1&uprefix=ignored_&fmap.last_modified=last_modified_dt"
 ----
 
 [NOTE]
@@ -606,18 +606,18 @@ If `literalsOverride=false`, literals will be appended as multi-value to the Tik
 
 The command below captures `<h1>` tags separately (`capture=h1`), and then maps all the instances of that field to a dynamic field named `foo_t` (`fmap.h1=foo_t`).
 
-[,console]
+[,bash]
 ----
-$ bin/solr post -c gettingstarted example/exampledocs/sample.html --params "literal.id=doc2&captureAttr=true&defaultField=_text_&fmap.h1=foo_t&capture=h1"
+bin/solr post -c gettingstarted example/exampledocs/sample.html --params "literal.id=doc2&captureAttr=true&defaultField=_text_&fmap.h1=foo_t&capture=h1"
 ----
 
 === Using Literals to Define Custom Metadata
 
 To add in your own metadata, pass in the literal parameter along with the file:
 
-[,console]
+[,bash]
 ----
-$ bin/solr post -c gettingstarted --params "literal.id=doc4&captureAttr=true&defaultField=text&capture=div&fmap.div=foo_t&literal.blah_s=Bah" example/exampledocs/sample.html
+bin/solr post -c gettingstarted --params "literal.id=doc4&captureAttr=true&defaultField=text&capture=div&fmap.div=foo_t&literal.blah_s=Bah" example/exampledocs/sample.html
 ----
 
 The parameter `literal.blah_s=Bah` will insert a field `blah_s` into every document.
@@ -627,9 +627,9 @@ Every instance of the text will be "Bah".
 
 The example below passes in an XPath expression to restrict the XHTML returned by Tika:
 
-[,console]
+[,bash]
 ----
-$ bin/solr post -c gettingstarted --params "literal.id=doc5&captureAttr=true&defaultField=text&capture=h1&fmap.h1=foo_t&xpath=/xhtml:html/xhtml:body/xhtml:h1//node()" example/exampledocs/sample.html
+bin/solr post -c gettingstarted --params "literal.id=doc5&captureAttr=true&defaultField=text&capture=h1&fmap.h1=foo_t&xpath=/xhtml:html/xhtml:body/xhtml:h1//node()" example/exampledocs/sample.html
 ----
 
 === Extracting Data without Indexing
@@ -646,9 +646,9 @@ curl "http://localhost:8983/solr/gettingstarted/update/extract?&extractOnly=true
 
 The output includes XML generated by Tika (and further escaped by Solr's XML) using a different output format to make it more readable (`-out yes` instructs the tool to echo Solr's output to the console):
 
-[,console]
+[,bash]
 ----
-$ bin/solr post -c gettingstarted --params "extractOnly=true&wt=json&indent=true" --verbose example/exampledocs/sample.html
+bin/solr post -c gettingstarted --params "extractOnly=true&wt=json&indent=true" --verbose example/exampledocs/sample.html
 ----
 
 === Using Solr Cell with a POST Request
diff --git a/solr/solr-ref-guide/modules/indexing-guide/pages/post-command.adoc b/solr/solr-ref-guide/modules/indexing-guide/pages/post-command.adoc
index b7a8cfb8738..b25f10be35f 100644
--- a/solr/solr-ref-guide/modules/indexing-guide/pages/post-command.adoc
+++ b/solr/solr-ref-guide/modules/indexing-guide/pages/post-command.adoc
@@ -23,9 +23,9 @@ NOTE: This tool is meant for use by new users exploring Solr's capabilities, and
 
 To run it, open a window and enter:
 
-[,console]
+[,bash]
 ----
-$ bin/solr post --solr-url http://localhost:8983 --name gettingstarted example/films/films.json
+bin/solr post --solr-url http://localhost:8983 --name gettingstarted example/films/films.json
 ----
 
 This will contact the server at `localhost:8983`.
@@ -84,41 +84,41 @@ This section presents several examples.
 
 Index all JSON files into `gettingstarted`.
 
-[,console]
+[,bash]
 ----
-$ bin/solr post --solr-url http://localhost:8983 --name gettingstarted *.json
+bin/solr post --solr-url http://localhost:8983 --name gettingstarted *.json
 ----
 
 === Indexing XML
 
 Add all documents with file extension `.xml` to the collection named `gettingstarted`.
 
-[,console]
+[,bash]
 ----
-$ bin/solr post --solr-url http://localhost:8983 --name gettingstarted *.xml
+bin/solr post --solr-url http://localhost:8983 --name gettingstarted *.xml
 ----
 
 Add all documents starting with `article` with file extension `.xml` to the `gettingstarted` collection on Solr running on port `8984`.
 
-[,console]
+[,bash]
 ----
-$ bin/solr post --solr-url http://localhost:8984 --name gettingstarted article*.xml
+bin/solr post --solr-url http://localhost:8984 --name gettingstarted article*.xml
 ----
 
 Send XML arguments to delete a document from `gettingstarted`.
 
-[,console]
+[,bash]
 ----
-$ bin/solr post --solr-url http://localhost:8983 --name gettingstarted --mode args --type application/xml '<delete><id>42</id></delete>'
+bin/solr post --solr-url http://localhost:8983 --name gettingstarted --mode args --type application/xml '<delete><id>42</id></delete>'
 ----
 
 === Indexing CSV and JSON
 
 Index all CSV and JSON files into `gettingstarted` from current directory:
 
-[,console]
+[,bash]
 ----
-$ bin/solr post -c gettingstarted --filetypes json,csv .
+bin/solr post -c gettingstarted --filetypes json,csv .
 ----
 
 `--filetypes` also applies to files named on the command line, including a shell-expanded `*`.
@@ -126,9 +126,9 @@ A file with any other extension is skipped with a warning, unless `--type` is se
 
 Index a tab-separated file into `gettingstarted`:
 
-[,console]
+[,bash]
 ----
-$ bin/solr post --solr-url http://localhost:8984 --name signals --params "separator=%09" --type text/csv data.tsv
+bin/solr post --solr-url http://localhost:8984 --name signals --params "separator=%09" --type text/csv data.tsv
 ----
 
 The content type (`-type`) parameter is required to treat the file as the proper type, otherwise it will be ignored and a WARNING logged as it does not know what type of content a .tsv file is.
@@ -140,32 +140,32 @@ Index a PDF file into `gettingstarted`.
 
 NOTE: This requires a Tika Server to be configured. See xref:indexing-with-tika.adoc#tika-server[Indexing With Tika] for details.
 
-[,console]
+[,bash]
 ----
-$ bin/solr post --solr-url http://localhost:8983/solr --name gettingstarted a.pdf
+bin/solr post --solr-url http://localhost:8983/solr --name gettingstarted a.pdf
 ----
 
 Automatically detect content types in a folder, and recursively scan it for documents for indexing into `gettingstarted`.
 
-[,console]
+[,bash]
 ----
-$ bin/solr post --solr-url http://localhost:8983 --name gettingstarted  afolder/
+bin/solr post --solr-url http://localhost:8983 --name gettingstarted  afolder/
 ----
 
 Automatically detect content types in a folder, but limit it to PPT and HTML files and index into `gettingstarted`.
 
-[,console]
+[,bash]
 ----
-$ bin/solr post --solr-url http://localhost:8983 --name gettingstarted --filetypes ppt,html afolder/
+bin/solr post --solr-url http://localhost:8983 --name gettingstarted --filetypes ppt,html afolder/
 ----
 
 === Indexing to a Password Protected Solr (Basic Auth)
 
 Index a PDF as the user "solr" with password "SolrRocks":
 
-[,console]
+[,bash]
 ----
-$ bin/solr post -u solr:SolrRocks --solr-url http://localhost:8983 --name gettingstarted a.pdf
+bin/solr post -u solr:SolrRocks --solr-url http://localhost:8983 --name gettingstarted a.pdf
 ----
 
 === Crawling a Website to Index Documents
@@ -174,9 +174,9 @@ Crawl the Apache Solr website going one layer deep and indexing the pages into S
 
 See xref:indexing-with-tika.adoc#trying-out-solr-cell[Trying Out Solr Cell] to learn more about setting up Solr for extracting content from web pages.
 
-[,console]
+[,bash]
 ----
-$ bin/solr post --mode web -c gettingstarted --recursive 1 --delay 1 https://solr.apache.org/
+bin/solr post --mode web -c gettingstarted --recursive 1 --delay 1 https://solr.apache.org/
 ----
 
 === Standard Input as Source for Indexing
@@ -184,16 +184,16 @@ $ bin/solr post --mode web -c gettingstarted --recursive 1 --delay 1 https://sol
 You can use the standard input as your source for data to index.
 Notice the `--verbose` providing raw responses from Solr.
 
-[,console]
+[,bash]
 ----
-$ echo '{commit: {}}' | bin/solr post --mode stdin --solr-url http://localhost:8983 --name my_collection --verbose
+echo '{commit: {}}' | bin/solr post --mode stdin --solr-url http://localhost:8983 --name my_collection --verbose
 ----
 
 === Raw Data as Source for Indexing
 
 Provide the raw document as a string for indexing.
 
-[,console]
+[,bash]
 ----
-$ bin/solr post --solr-url http://localhost:8983 --name signals -mode args --type text/csv --verbose $'id,value\n1,0.47'
+bin/solr post --solr-url http://localhost:8983 --name signals -mode args --type text/csv --verbose $'id,value\n1,0.47'
 ----
diff --git a/solr/solr-ref-guide/modules/query-guide/pages/dense-vector-search.adoc b/solr/solr-ref-guide/modules/query-guide/pages/dense-vector-search.adoc
index 4a42f97cbe3..2e2ab4b3d19 100644
--- a/solr/solr-ref-guide/modules/query-guide/pages/dense-vector-search.adoc
+++ b/solr/solr-ref-guide/modules/query-guide/pages/dense-vector-search.adoc
@@ -187,12 +187,15 @@ JSON::
 ====
 [source,json]
 ----
-[{ "id": "1",
-"vector": [1.0, 2.5, 3.7, 4.1]
-},
-{ "id": "2",
-"vector": [1.5, 5.5, 6.7, 65.1]
-}
+[
+  { 
+    "id": "1",
+    "vector": [1.0, 2.5, 3.7, 4.1]
+  },
+  { 
+    "id": "2",
+    "vector": [1.5, 5.5, 6.7, 65.1]
+  }
 ]
 ----
 ====
@@ -203,20 +206,20 @@ XML::
 [source,xml]
 ----
 <add>
-<doc>
-<field name="id">1</field>
-<field name="vector">1.0</field>
-<field name="vector">2.5</field>
-<field name="vector">3.7</field>
-<field name="vector">4.1</field>
-</doc>
-<doc>
-<field name="id">2</field>
-<field name="vector">1.5</field>
-<field name="vector">5.5</field>
-<field name="vector">6.7</field>
-<field name="vector">65.1</field>
-</doc>
+  <doc>
+    <field name="id">1</field>
+    <field name="vector">1.0</field>
+    <field name="vector">2.5</field>
+    <field name="vector">3.7</field>
+    <field name="vector">4.1</field>
+  </doc>
+  <doc>
+    <field name="id">2</field>
+    <field name="vector">1.5</field>
+    <field name="vector">5.5</field>
+    <field name="vector">6.7</field>
+    <field name="vector">65.1</field>
+  </doc>
 </add>
 ----
 ====
@@ -251,12 +254,15 @@ JSON::
 ====
 [source,json]
 ----
-[{ "id": "1",
- "vector_multivalued": [[1.0, 2.0, 3.0, 4.0],[5.0, 6.0, 7.0, 8.0]]
-},
-{ "id": "2",
- "vector_multivalued": [[1.0, 2.0, 3.0, 4.0],[5.0, 6.0, 7.0, 8.0]]
-}
+[
+  { 
+    "id": "1",
+    "vector_multivalued": [[1.0, 2.0, 3.0, 4.0],[5.0, 6.0, 7.0, 8.0]]
+  },
+  { 
+    "id": "2",
+    "vector_multivalued": [[1.0, 2.0, 3.0, 4.0],[5.0, 6.0, 7.0, 8.0]]
+  }
 ]
 ----
 ====
@@ -966,12 +972,15 @@ JSON::
 ====
 [source,json]
 ----
-[{ "id": "1",
-"my_late_vector": "[[1.0, 2, 3.7, 4.1], [2.2, -2.5, 7.3, 4.0]]",
-},
-{ "id": "2",
-"my_late_vector": "[[2.0, 5.6, -3.2, 1.4], [7.8, -2.5, 3.7, 0.0034], [-2.2, 5.5, 0.6, -0.030]]"
-}
+[
+  {
+    "id": "1",
+    "my_late_vector": "[[1.0, 2, 3.7, 4.1], [2.2, -2.5, 7.3, 4.0]]"
+  },
+  {
+    "id": "2",
+    "my_late_vector": "[[2.0, 5.6, -3.2, 1.4], [7.8, -2.5, 3.7, 0.0034], [-2.2, 5.5, 0.6, -0.030]]"
+  }
 ]
 ----
 ====
@@ -982,14 +991,14 @@ XML::
 [source,xml]
 ----
 <add>
-<doc>
-<field name="id">1</field>
-<field name="my_late_vector">[[1.0, 2, 3.7, 4.1], [2.2, -2.5, 7.3, 4.0]]</field>
-</doc>
-<doc>
-<field name="id">2</field>
-<field name="my_late_vector">[[2.0, 5.6, -3.2, 1.4], [7.8, -2.5, 3.7, 0.0034], [-2.2, 5.5, 0.6, -0.030]]</field>
-</doc>
+  <doc>
+    <field name="id">1</field>
+    <field name="my_late_vector">[[1.0, 2, 3.7, 4.1], [2.2, -2.5, 7.3, 4.0]]</field>
+  </doc>
+  <doc>
+    <field name="id">2</field>
+    <field name="my_late_vector">[[2.0, 5.6, -3.2, 1.4], [7.8, -2.5, 3.7, 0.0034], [-2.2, 5.5, 0.6, -0.030]]</field>
+  </doc>
 </add>
 ----
 ====
@@ -1246,21 +1255,21 @@ EOF
 
 . Start Solr
 +
-[source,sh]
+[source,bash]
 ----
 ./bin/solr start
 ----
 
 . Upload the configset and create a collection
 +
-[source,sh]
+[source,bash]
 ----
 ./bin/solr zk upconfig -n cuvs_vectors -d cuvs_configset/conf && ./bin/solr create -c vectors -n cuvs_vectors
 ----
 
 . Index documents
 +
-[source,sh]
+[source,bash]
 ----
 curl -s "http://localhost:8983/solr/vectors/update?commit=true" \
      -H "Content-Type: application/json" \
@@ -1275,7 +1284,7 @@ curl -s "http://localhost:8983/solr/vectors/update?commit=true" \
 
 . Query the index
 +
-[source,sh]
+[source,bash]
 ----
 curl -s 'http://localhost:8983/solr/vectors/select?q=%7B!knn%20f=article_vector%20topK=1%7D%5B0.84393,0.50073,0.57059,0.89899,-0.08722,0.26803,0.00807,0.09877%5D&fl=id,score&rows=3&omitHeader=true'
 ----
diff --git a/solr/solr-ref-guide/modules/query-guide/pages/pagination-of-results.adoc b/solr/solr-ref-guide/modules/query-guide/pages/pagination-of-results.adoc
index 769744887ea..765f27dcd84 100644
--- a/solr/solr-ref-guide/modules/query-guide/pages/pagination-of-results.adoc
+++ b/solr/solr-ref-guide/modules/query-guide/pages/pagination-of-results.adoc
@@ -160,33 +160,33 @@ include::example$PaginationRefGuideExamplesTest.java[tag=cursormark-query]
 
 If you wanted to do this by hand using curl, the sequence of requests would look something like this:
 
-[source,plain]
+[source,console]
 ----
-curl '...&rows=10&sort=id+asc&cursorMark=*'
+$ curl '...&rows=10&sort=id+asc&cursorMark=*'
 {
   "response":{"numFound":32,"start":0,"docs":[
     // ... 10 docs here ...
   ]},
   "nextCursorMark":"AoEjR0JQ"}
-curl '...&rows=10&sort=id+asc&cursorMark=AoEjR0JQ'
+$ curl '...&rows=10&sort=id+asc&cursorMark=AoEjR0JQ'
 {
   "response":{"numFound":32,"start":0,"docs":[
     // ... 10 more docs here ...
   ]},
   "nextCursorMark":"AoEpVkRCREIxQTE2"}
-curl '...&rows=10&sort=id+asc&cursorMark=AoEpVkRCREIxQTE2'
+$ curl '...&rows=10&sort=id+asc&cursorMark=AoEpVkRCREIxQTE2'
 {
   "response":{"numFound":32,"start":0,"docs":[
     // ... 10 more docs here ...
   ]},
   "nextCursorMark":"AoEmbWF4dG9y"}
-curl '...&rows=10&sort=id+asc&cursorMark=AoEmbWF4dG9y'
+$ curl '...&rows=10&sort=id+asc&cursorMark=AoEmbWF4dG9y'
 {
   "response":{"numFound":32,"start":0,"docs":[
     // ... 2 docs here because we've reached the end.
   ]},
   "nextCursorMark":"AoEpdmlld3Nvbmlj"}
-curl '...&rows=10&sort=id+asc&cursorMark=AoEpdmlld3Nvbmlj'
+$ curl '...&rows=10&sort=id+asc&cursorMark=AoEpdmlld3Nvbmlj'
 {
   "response":{"numFound":32,"start":0,"docs":[
     // no more docs here, and note that the nextCursorMark
diff --git a/solr/solr-ref-guide/modules/query-guide/pages/searching-nested-documents.adoc b/solr/solr-ref-guide/modules/query-guide/pages/searching-nested-documents.adoc
index 8cd15cbfafd..a64b5d80ba3 100644
--- a/solr/solr-ref-guide/modules/query-guide/pages/searching-nested-documents.adoc
+++ b/solr/solr-ref-guide/modules/query-guide/pages/searching-nested-documents.adoc
@@ -41,9 +41,9 @@ For a detailed explanation of this transformer, and specifics on its syntax & li
 
 A simple query matching all documents with a description that includes "staplers":
 
-[source,text]
+[source,console]
 ----
-curl 'http://localhost:8983/solr/gettingstarted/select?omitHeader=true&q=description_t:staplers'
+$ curl 'http://localhost:8983/solr/gettingstarted/select?omitHeader=true&q=description_t:staplers'
 {
   "response":{"numFound":1,"start":0,"maxScore":0.30136836,"numFoundExact":true,"docs":[
       {
@@ -57,9 +57,9 @@ curl 'http://localhost:8983/solr/gettingstarted/select?omitHeader=true&q=descrip
 The same query with the addition of the `[child]` transformer is shown below.
 Note that the `numFound` has not changed, we are still matching the same set of documents, but when returning those documents the nested children are also returned as pseudo-fields.
 
-[source,text]
+[source,console]
 ----
-curl 'http://localhost:8983/solr/gettingstarted/select?omitHeader=true&q=description_t:staplers&fl=*,[child]'
+$ curl 'http://localhost:8983/solr/gettingstarted/select?omitHeader=true&q=description_t:staplers&fl=*,[child]'
 {
   "response":{"numFound":1,"start":0,"maxScore":0.30136836,"numFoundExact":true,"docs":[
       {
@@ -110,9 +110,9 @@ For a detailed explanation of this parser, see the section xref:block-join-query
 
 Let's consider again the `description_t:staplers` query used above -- if we wrap that query in a `{!child}` query parser with `parentPath="/"` then instead of "matching" & returning the product level documents, we instead match all of the _descendent_ child documents of the original query:
 
-[source,text]
+[source,console]
 ----
-curl 'http://localhost:8983/solr/gettingstarted/select' -d 'omitHeader=true' --data-urlencode 'q={!child parentPath="/"}description_t:staplers'
+$ curl 'http://localhost:8983/solr/gettingstarted/select' -d 'omitHeader=true' --data-urlencode 'q={!child parentPath="/"}description_t:staplers'
 {
   "response":{"numFound":5,"start":0,"maxScore":0.30136836,"numFoundExact":true,"docs":[
       {
@@ -151,9 +151,9 @@ In this example `parentPath="/"` indicates we want to consider all root-level do
 By changing the `parentPath` to a specific `_nest_path_` level, we can narrow down the list of children we return.
 In the query below, we search for all children of `skus` with a `price_i` less than `50`:
 
-[source,text]
+[source,console]
 ----
-curl 'http://localhost:8983/solr/gettingstarted/select' -d 'omitHeader=true' --data-urlencode 'q={!child parentPath="/skus"}price_i:[* TO 50]'
+$ curl 'http://localhost:8983/solr/gettingstarted/select' -d 'omitHeader=true' --data-urlencode 'q={!child parentPath="/skus"}price_i:[* TO 50]'
 {
   "response":{"numFound":1,"start":0,"maxScore":1.0,"numFoundExact":true,"docs":[
       {
@@ -172,9 +172,9 @@ For a detailed explanation of this parser, see the section xref:block-join-query
 
 Let's first consider this example of searching for all "manual" type documents that have exactly `1` page:
 
-[source,text]
+[source,console]
 ----
-curl 'http://localhost:8983/solr/gettingstarted/select?omitHeader=true&q=pages_i:1'
+$ curl 'http://localhost:8983/solr/gettingstarted/select?omitHeader=true&q=pages_i:1'
 {
   "response":{"numFound":3,"start":0,"maxScore":1.0,"numFoundExact":true,"docs":[
       {
@@ -200,9 +200,9 @@ curl 'http://localhost:8983/solr/gettingstarted/select?omitHeader=true&q=pages_i
 
 We can wrap that query in a `{!parent}` query with `parentPath="/"` to return the details of all root-level products that are ancestors of these manuals:
 
-[source,text]
+[source,console]
 ----
-curl 'http://localhost:8983/solr/gettingstarted/select' -d 'omitHeader=true' --data-urlencode 'q={!parent parentPath="/"}pages_i:1'
+$ curl 'http://localhost:8983/solr/gettingstarted/select' -d 'omitHeader=true' --data-urlencode 'q={!parent parentPath="/"}pages_i:1'
 {
   "response":{"numFound":2,"start":0,"maxScore":1.4E-45,"numFoundExact":true,"docs":[
       {
@@ -224,9 +224,9 @@ By changing `parentPath` to a specific path, we can change the type of ancestors
 In the query below, we search for the `skus` that are the ancestors of `manuals` with exactly `1` page.
 Adding `childPath="manuals"` constrains the child query to only docs nested at `/skus/manuals`, preventing pages from other child types from matching:
 
-[source,text]
+[source,console]
 ----
-curl 'http://localhost:8983/solr/gettingstarted/select' -d 'omitHeader=true' --data-urlencode 'q={!parent parentPath="/skus" childPath="manuals"}pages_i:1'
+$ curl 'http://localhost:8983/solr/gettingstarted/select' -d 'omitHeader=true' --data-urlencode 'q={!parent parentPath="/skus" childPath="manuals"}pages_i:1'
 {
   "response":{"numFound":2,"start":0,"maxScore":1.4E-45,"numFoundExact":true,"docs":[
       {
@@ -254,9 +254,9 @@ Here for example is a query where:
 *** "lifetime guarantee" in their content
 * each return (sku) document also includes any descendent (manuals) documents it has
 
-[source,text]
+[source,console]
 ----
-curl 'http://localhost:8983/solr/gettingstarted/select' -d 'omitHeader=true' -d 'fq=color_s:RED' --data-urlencode 'q={!child parentPath="/" filters=$parent_fq}' --data-urlencode 'parent_fq={!parent parentPath="/"}content_t:"lifetime guarantee"' -d 'fl=*,[child]'
+$ curl 'http://localhost:8983/solr/gettingstarted/select' -d 'omitHeader=true' -d 'fq=color_s:RED' --data-urlencode 'q={!child parentPath="/" filters=$parent_fq}' --data-urlencode 'parent_fq={!parent parentPath="/"}content_t:"lifetime guarantee"' -d 'fl=*,[child]'
 {
   "response":{"numFound":1,"start":0,"maxScore":1.4E-45,"numFoundExact":true,"docs":[
       {
diff --git a/solr/solr-ref-guide/modules/query-guide/pages/spatial-search.adoc b/solr/solr-ref-guide/modules/query-guide/pages/spatial-search.adoc
index da5afbcaec3..8c180681806 100644
--- a/solr/solr-ref-guide/modules/query-guide/pages/spatial-search.adoc
+++ b/solr/solr-ref-guide/modules/query-guide/pages/spatial-search.adoc
@@ -70,9 +70,9 @@ However, it's much bulkier than the raw coordinates for such simple data.
 
 Using the `bin/solr post` tool:
 
-[,console]
+[,bash]
 ----
-$ bin/solr post -t "application/json" --solr-url http://localhost:8983 --name mycollection --params "format=geojson" /path/to/geojson.file
+bin/solr post -t "application/json" --solr-url http://localhost:8983 --name mycollection --params "format=geojson" /path/to/geojson.file
 ----
 
 The key parameter to pass in with your request is:
diff --git a/solr/solr-ref-guide/modules/query-guide/pages/stream-command.adoc b/solr/solr-ref-guide/modules/query-guide/pages/stream-command.adoc
index 64b2b369dcd..8cba038e782 100644
--- a/solr/solr-ref-guide/modules/query-guide/pages/stream-command.adoc
+++ b/solr/solr-ref-guide/modules/query-guide/pages/stream-command.adoc
@@ -26,14 +26,14 @@ It may change in backwards-incompatible ways as it evolves to cover additional f
 
 To run it, open a terminal and enter:
 
-[,console]
+[,bash]
 ----
-$ bin/solr stream -c techproducts --header --fields price,name --delimiter=\| 'search(techproducts,q="iPod",fl="name,price")'
+bin/solr stream -c techproducts --header --fields price,name --delimiter=\| 'search(techproducts,q="iPod",fl="name,price")'
 ----
 
 This will run the provided streaming expression on the `techproducts` collection on your local Solr and produce:
 
-[,console]
+[,text]
 ----
 price|name
 11.5|iPod & iPod Mini USB 2.0 Cable
@@ -70,14 +70,14 @@ Notice the various ways to format comments in the file?
 
 Then you can run it on the Solr collection `techproducts`, specifying you want a header row:
 
-[,console]
+[,bash]
 ----
-$ bin/solr stream --header -c techproducts stream.expr
+bin/solr stream --header -c techproducts stream.expr
 ----
 
 And this will produce:
 
-[,console]
+[,text]
 ----
 name   price
 CORSAIR  XMS 2GB (2 x 1GB) 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) Dual Channel Kit System Memory - Retail   185.0
@@ -151,9 +151,9 @@ Running this expression will read in the local file and send the first two lines
 TIP: Want to send data to a remote Solr?  pass in `--solr-url http://solr.remote:8983`.
 
 
-[,console]
+[,bash]
 ----
-$ bin/solr stream --execution local --header load_data.expr
+bin/solr stream --execution local --header load_data.expr
 ----
 
 
@@ -171,9 +171,9 @@ Caveats:
 
 Index a CSV file into `gettingstarted` collection.
 
-[,console]
+[,bash]
 ----
-$ cat example/exampledocs/books.csv | bin/solr stream -e local 'update(gettingstarted,parseCSV(stdin()))'
+cat example/exampledocs/books.csv | bin/solr stream -e local 'update(gettingstarted,parseCSV(stdin()))'
 ----
 
 === Variable interpolation
@@ -200,7 +200,7 @@ update(
 )
 ----
 
-[,console]
+[,bash]
 ----
-$ bin/solr stream -c techproducts file.expr ./example/exampledocs/books.csv 10
+bin/solr stream -c techproducts file.expr ./example/exampledocs/books.csv 10
 ----
diff --git a/solr/solr-ref-guide/modules/query-guide/pages/tagger-handler.adoc b/solr/solr-ref-guide/modules/query-guide/pages/tagger-handler.adoc
index ba11e5ab27c..17bf9e903bb 100644
--- a/solr/solr-ref-guide/modules/query-guide/pages/tagger-handler.adoc
+++ b/solr/solr-ref-guide/modules/query-guide/pages/tagger-handler.adoc
@@ -275,16 +275,16 @@ should be almost 7MB file expanding to a cities1000.txt file around
 population.
 
 Using bin/solr post:
-[,console]
+[,bash]
 ----
-$ bin/solr post -c geonames -t text/csv \
+bin/solr post -c geonames -t text/csv \
   --params 'optimize=true&maxSegments=1&separator=%09&encapsulator=%00&fieldnames=id,name,,alternative_names,latitude,longitude,,,countrycode,,,,,,population,elevation,,timezone,lastupdate' \
   /tmp/cities1000.txt
 ----
 
 or using curl:
 
-[,console]
+[,bash]
 ----
 curl 'http://localhost:8983/solr/geonames/update?commit=true&optimize=true&maxSegments=1&separator=%09&encapsulator=%00&fieldnames=id,name,,alternative_names,latitude,longitude,,,countrycode,,,,,,population,elevation,,timezone,lastupdate' \
   --data-binary @/path/to/cities1000.txt -H 'Content-type:application/csv'
@@ -306,7 +306,7 @@ This is a trivial example tagging a small piece of text.
 For more
 options, see the earlier documentation.
 
-[,console]
+[,bash]
 ----
 curl \
   'http://localhost:8983/solr/geonames/tag?overlaps=NO_SUB&tagsLimit=5000&fl=id,name,countrycode&wt=json&indent=on' \


(solr) 09/11: SOLR-16396 | Migrate GET /config/overlay and GET /config/znodeVersion to JAX-RS. (#5022)

Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit fbf16dedeb8c804a7a47c69daa14ac7cc552876b
Author: Jalaz Kumar <ja...@gmail.com>
AuthorDate: Mon Oct 12 17:46:01 2026 +0530

    SOLR-16396 | Migrate GET /config/overlay and GET /config/znodeVersion to JAX-RS. (#5022)
    
    (cherry picked from commit 597ed67740831566b708b793f52554b2e49e7e17)
---
 .../unreleased/SOLR-16396-config-get-others.yml    |   9 ++
 .../apache/solr/client/api/endpoint/ConfigApi.java |  26 +++++
 .../client/api/model/ConfigOverlayResponse.java    |  25 +++++
 .../api/model/ConfigZnodeVersionResponse.java      |  32 ++++++
 .../org/apache/solr/handler/SolrConfigHandler.java | 122 ++++++++++-----------
 .../apache/solr/handler/admin/api/GetConfig.java   |  29 +++++
 .../solr/handler/admin/api/GetConfigAPI.java       |   2 -
 .../solr/handler/admin/V2ConfigAPIMappingTest.java |   2 -
 .../handler/admin/api/GetConfigSolrCloudTest.java  |  26 ++++-
 .../solr/handler/admin/api/GetConfigTest.java      |  24 ++++
 .../solrj/src/resources/java-template/api.mustache |   8 +-
 11 files changed, 234 insertions(+), 71 deletions(-)

diff --git a/changelog/unreleased/SOLR-16396-config-get-others.yml b/changelog/unreleased/SOLR-16396-config-get-others.yml
new file mode 100644
index 00000000000..56e36c32586
--- /dev/null
+++ b/changelog/unreleased/SOLR-16396-config-get-others.yml
@@ -0,0 +1,9 @@
+title:
+  Migrate GET /config/overlay and GET /config/znodeVersion to JAX-RS.
+type: changed
+authors:
+  - name: Jalaz Kumar
+    nick: jaykay12
+links:
+  - name: SOLR-16396
+    url: https://issues.apache.org/jira/browse/SOLR-16396
diff --git a/solr/api/src/java/org/apache/solr/client/api/endpoint/ConfigApi.java b/solr/api/src/java/org/apache/solr/client/api/endpoint/ConfigApi.java
index 3e0ab463af2..cc9cecc1bb5 100644
--- a/solr/api/src/java/org/apache/solr/client/api/endpoint/ConfigApi.java
+++ b/solr/api/src/java/org/apache/solr/client/api/endpoint/ConfigApi.java
@@ -25,6 +25,8 @@ import jakarta.ws.rs.GET;
 import jakarta.ws.rs.Path;
 import jakarta.ws.rs.QueryParam;
 import org.apache.solr.client.api.model.ConfigInfoResponse;
+import org.apache.solr.client.api.model.ConfigOverlayResponse;
+import org.apache.solr.client.api.model.ConfigZnodeVersionResponse;
 import org.apache.solr.client.api.util.StoreApiParameters;
 
 /** V2 API for reading and modifying a core/collection's config */
@@ -42,5 +44,29 @@ public interface ConfigApi {
             @DefaultValue("false")
             @Parameter(description = "Expand request handler useParams and effective parameters")
             boolean expandParams);
+
+    @GET
+    @Path("/overlay")
+    @StoreApiParameters
+    @Operation(
+        summary = "Fetch the config overlay of the specified core or collection",
+        tags = {"config"})
+    ConfigOverlayResponse getOverlay();
+
+    @GET
+    @Path("/znodeVersion")
+    @StoreApiParameters
+    @Operation(
+        summary = "Fetch znode versions for config overlay and request params",
+        tags = {"config"})
+    ConfigZnodeVersionResponse getZnodeVersion(
+        @QueryParam("overlay")
+            @DefaultValue("-1")
+            @Parameter(description = "Expected overlay znode version")
+            int expectedOverlayVersion,
+        @QueryParam("params")
+            @DefaultValue("-1")
+            @Parameter(description = "Expected request-params znode version")
+            int expectedParamsVersion);
   }
 }
diff --git a/solr/api/src/java/org/apache/solr/client/api/model/ConfigOverlayResponse.java b/solr/api/src/java/org/apache/solr/client/api/model/ConfigOverlayResponse.java
new file mode 100644
index 00000000000..e75aaf25fba
--- /dev/null
+++ b/solr/api/src/java/org/apache/solr/client/api/model/ConfigOverlayResponse.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.client.api.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+public class ConfigOverlayResponse extends SolrJerseyResponse {
+  @JsonProperty("overlay")
+  public Map<String, Object> overlay;
+}
diff --git a/solr/api/src/java/org/apache/solr/client/api/model/ConfigZnodeVersionResponse.java b/solr/api/src/java/org/apache/solr/client/api/model/ConfigZnodeVersionResponse.java
new file mode 100644
index 00000000000..01cecfaa73f
--- /dev/null
+++ b/solr/api/src/java/org/apache/solr/client/api/model/ConfigZnodeVersionResponse.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.client.api.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ConfigZnodeVersionResponse extends SolrJerseyResponse {
+  @JsonProperty("znodeVersion")
+  public ZnodeVersions znodeVersion;
+
+  public static class ZnodeVersions {
+    @JsonProperty("overlay")
+    public int overlay;
+
+    @JsonProperty("params")
+    public int params;
+  }
+}
diff --git a/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java b/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java
index f8b96086fd7..7f79e5a55e3 100644
--- a/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/SolrConfigHandler.java
@@ -173,7 +173,7 @@ public class SolrConfigHandler extends RequestHandlerBase
     return immutable != null && Boolean.parseBoolean(immutable.toString());
   }
 
-  private class Command {
+  private static class Command {
     private final SolrQueryRequest req;
     private final SolrQueryResponse resp;
     private final String method;
@@ -201,7 +201,7 @@ public class SolrConfigHandler extends RequestHandlerBase
             resp, new GetConfig(req).getConfig(req.getParams().getBool("expandParams", false)));
       } else {
         if (ConfigOverlay.NAME.equals(parts.get(1))) {
-          resp.add(ConfigOverlay.NAME, req.getCore().getSolrConfig().getOverlay());
+          V2ApiUtils.squashIntoSolrResponseWithoutHeader(resp, new GetConfig(req).getOverlay());
         } else if (RequestParams.NAME.equals(parts.get(1))) {
           if (parts.size() == 3) {
             RequestParams params = req.getCore().getSolrConfig().getRequestParams();
@@ -218,66 +218,12 @@ public class SolrConfigHandler extends RequestHandlerBase
 
         } else {
           if (ZNODEVER.equals(parts.get(1))) {
-            resp.add(
-                ZNODEVER,
-                Map.of(
-                    ConfigOverlay.NAME,
-                    req.getCore().getSolrConfig().getOverlay().getVersion(),
-                    RequestParams.NAME,
-                    req.getCore().getSolrConfig().getRequestParams().getZnodeVersion()));
-            boolean isStale = false;
-            int expectedVersion = req.getParams().getInt(ConfigOverlay.NAME, -1);
-            int actualVersion = req.getCore().getSolrConfig().getOverlay().getVersion();
-            if (expectedVersion > actualVersion) {
-              log.info(
-                  "expecting overlay version {} but my version is {}",
-                  expectedVersion,
-                  actualVersion);
-              isStale = true;
-            } else if (expectedVersion != -1) {
-              log.info("I already have the expected version {} of config", expectedVersion);
-            }
-            expectedVersion = req.getParams().getInt(RequestParams.NAME, -1);
-            actualVersion = req.getCore().getSolrConfig().getRequestParams().getZnodeVersion();
-            if (expectedVersion > actualVersion) {
-              log.info(
-                  "expecting params version {} but my version is {}",
-                  expectedVersion,
-                  actualVersion);
-              isStale = true;
-            } else if (expectedVersion != -1) {
-              log.info("I already have the expected version {} of params", expectedVersion);
-            }
-            if (isStale && req.getCore().getResourceLoader() instanceof ZkSolrResourceLoader) {
-              new Thread(
-                      () -> {
-                        if (!reloadLock.tryLock()) {
-                          log.info("Another reload is in progress . Not doing anything");
-                          return;
-                        }
-                        try {
-                          log.info("Trying to update my configs");
-                          SolrCore.getConfListener(
-                                  req.getCore(),
-                                  (ZkSolrResourceLoader) req.getCore().getResourceLoader())
-                              .run();
-                        } catch (Exception e) {
-                          log.error("Unable to refresh conf ", e);
-                        } finally {
-                          reloadLock.unlock();
-                        }
-                      },
-                      SolrConfigHandler.class.getSimpleName() + "-refreshconf")
-                  .start();
-            } else {
-              if (log.isInfoEnabled()) {
-                log.info(
-                    "isStale {} , resourceloader {}",
-                    isStale,
-                    req.getCore().getResourceLoader().getClass().getName());
-              }
-            }
-
+            V2ApiUtils.squashIntoSolrResponseWithoutHeader(
+                resp,
+                new GetConfig(req)
+                    .getZnodeVersion(
+                        req.getParams().getInt(ConfigOverlay.NAME, -1),
+                        req.getParams().getInt(RequestParams.NAME, -1)));
           } else {
             Map<String, Object> m = getConfigDetails(parts.get(1), req);
             Map<String, Object> val = new LinkedHashMap<>();
@@ -970,6 +916,58 @@ public class SolrConfigHandler extends RequestHandlerBase
     return activeReplicas;
   }
 
+  public static void maybeRefreshStaleConfig(
+      SolrCore core, int expectedOverlayVersion, int expectedParamsVersion) {
+    boolean isStale =
+        isExpectedVersionStale(
+                "overlay", expectedOverlayVersion, core.getSolrConfig().getOverlay().getVersion())
+            | isExpectedVersionStale(
+                "params",
+                expectedParamsVersion,
+                core.getSolrConfig().getRequestParams().getZnodeVersion());
+    if (isStale && core.getResourceLoader() instanceof ZkSolrResourceLoader) {
+      final Lock reloadLock =
+          ((SolrConfigHandler) core.getRequestHandler("/config")).getReloadLock();
+      new Thread(
+              () -> {
+                if (!reloadLock.tryLock()) {
+                  log.info("Another reload is in progress . Not doing anything");
+                  return;
+                }
+                try {
+                  log.info("Trying to update my configs");
+                  SolrCore.getConfListener(core, (ZkSolrResourceLoader) core.getResourceLoader())
+                      .run();
+                } catch (Exception e) {
+                  log.error("Unable to refresh conf ", e);
+                } finally {
+                  reloadLock.unlock();
+                }
+              },
+              SolrConfigHandler.class.getSimpleName() + "-refreshconf")
+          .start();
+    } else {
+      if (log.isInfoEnabled()) {
+        log.info(
+            "isStale {} , resourceloader {}",
+            isStale,
+            core.getResourceLoader().getClass().getName());
+      }
+    }
+  }
+
+  private static boolean isExpectedVersionStale(String label, int expected, int actual) {
+    if (expected == -1) {
+      return false;
+    }
+    if (expected > actual) {
+      log.info("expecting {} version {} but my version is {}", label, expected, actual);
+      return true;
+    }
+    log.info("I already have the expected version {} of {}", expected, label);
+    return false;
+  }
+
   @Override
   public Name getPermissionName(AuthorizationContext ctx) {
     switch (ctx.getHttpMethod()) {
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/api/GetConfig.java b/solr/core/src/java/org/apache/solr/handler/admin/api/GetConfig.java
index d46738ea347..80d46e7bac6 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/api/GetConfig.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/api/GetConfig.java
@@ -30,6 +30,8 @@ import java.util.Map;
 import org.apache.solr.api.JerseyResource;
 import org.apache.solr.client.api.endpoint.ConfigApi;
 import org.apache.solr.client.api.model.ConfigInfoResponse;
+import org.apache.solr.client.api.model.ConfigOverlayResponse;
+import org.apache.solr.client.api.model.ConfigZnodeVersionResponse;
 import org.apache.solr.common.params.MapSolrParams;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.NamedList;
@@ -37,6 +39,7 @@ import org.apache.solr.common.util.StrUtils;
 import org.apache.solr.common.util.Utils;
 import org.apache.solr.core.PluginInfo;
 import org.apache.solr.handler.RequestHandlerBase;
+import org.apache.solr.handler.SolrConfigHandler;
 import org.apache.solr.jersey.NullKeyTolerantMap;
 import org.apache.solr.jersey.PermissionName;
 import org.apache.solr.request.SolrQueryRequest;
@@ -60,6 +63,32 @@ public class GetConfig extends JerseyResource implements ConfigApi.Get {
     return response;
   }
 
+  @Override
+  @PermissionName(CONFIG_READ_PERM)
+  public ConfigOverlayResponse getOverlay() {
+    final var response = instantiateJerseyResponse(ConfigOverlayResponse.class);
+    response.overlay =
+        Utils.convertToMap(
+            solrQueryRequest.getCore().getSolrConfig().getOverlay(), new LinkedHashMap<>());
+    return response;
+  }
+
+  @Override
+  @PermissionName(CONFIG_READ_PERM)
+  public ConfigZnodeVersionResponse getZnodeVersion(
+      int expectedOverlayVersion, int expectedParamsVersion) {
+    final var response = instantiateJerseyResponse(ConfigZnodeVersionResponse.class);
+    final var core = solrQueryRequest.getCore();
+    final var solrConfig = core.getSolrConfig();
+
+    response.znodeVersion = new ConfigZnodeVersionResponse.ZnodeVersions();
+    response.znodeVersion.overlay = solrConfig.getOverlay().getVersion();
+    response.znodeVersion.params = solrConfig.getRequestParams().getZnodeVersion();
+
+    SolrConfigHandler.maybeRefreshStaleConfig(core, expectedOverlayVersion, expectedParamsVersion);
+    return response;
+  }
+
   @SuppressWarnings({"unchecked"})
   private Map<String, Object> buildConfigMap(
       SolrQueryRequest solrQueryRequest, boolean expandParams) {
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/api/GetConfigAPI.java b/solr/core/src/java/org/apache/solr/handler/admin/api/GetConfigAPI.java
index 2a2db95683e..6a0567c987c 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/api/GetConfigAPI.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/api/GetConfigAPI.java
@@ -59,8 +59,6 @@ public class GetConfigAPI {
   // Delete a path from this list when that section is migrated to Jersey
   @EndPoint(
       path = {
-        "/config/overlay",
-        "/config/znodeVersion",
         "/config/luceneMatchVersion",
         "/config/query",
         "/config/requestHandler",
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/V2ConfigAPIMappingTest.java b/solr/core/src/test/org/apache/solr/handler/admin/V2ConfigAPIMappingTest.java
index 0498b25dd5c..252946a5971 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/V2ConfigAPIMappingTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/V2ConfigAPIMappingTest.java
@@ -49,11 +49,9 @@ public class V2ConfigAPIMappingTest extends V2ApiMappingTest<SolrConfigHandler>
   // the API lookup works for a handful of the valid config "components".
   @Test
   public void testGetSingleComponentConfig() {
-    assertAnnotatedApiExistsFor("GET", "/config/overlay");
     assertAnnotatedApiExistsFor("GET", "/config/query");
     assertAnnotatedApiExistsFor("GET", "/config/jmx");
     assertAnnotatedApiExistsFor("GET", "/config/requestDispatcher");
-    assertAnnotatedApiExistsFor("GET", "/config/znodeVersion");
     assertAnnotatedApiExistsFor("GET", "/config/luceneMatchVersion");
     assertAnnotatedApiExistsFor("GET", "/config/indexConfigdeletionPolicy");
     assertAnnotatedApiExistsFor("GET", "/config/updateHandlerupdateLog");
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/api/GetConfigSolrCloudTest.java b/solr/core/src/test/org/apache/solr/handler/admin/api/GetConfigSolrCloudTest.java
index 297da96353d..7ce43a5ff3d 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/api/GetConfigSolrCloudTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/api/GetConfigSolrCloudTest.java
@@ -40,7 +40,7 @@ public class GetConfigSolrCloudTest extends SolrCloudTestCase {
   }
 
   @Test
-  public void testGetConfigFromCore() throws Exception {
+  public void testGetConfigFromCollection() throws Exception {
     var request = new ConfigApi.GetConfig(IndexType.COLLECTION, COLLECTION_NAME);
     var response = request.process(cluster.getSolrClient());
 
@@ -52,4 +52,28 @@ public class GetConfigSolrCloudTest extends SolrCloudTestCase {
     assertTrue(response.config.containsKey("query"));
     assertTrue(response.config.containsKey("requestHandler"));
   }
+
+  @Test
+  public void testGetOverlayFromCollection() throws Exception {
+    var request = new ConfigApi.GetOverlay(IndexType.COLLECTION, COLLECTION_NAME);
+    var response = request.process(cluster.getSolrClient());
+
+    assertNotNull(response);
+    assertNull(response.error);
+    assertNotNull(response.overlay);
+    assertTrue(response.overlay.containsKey("znodeVersion"));
+    assertEquals(-1, response.overlay.get("znodeVersion"));
+  }
+
+  @Test
+  public void testGetZnodeVersionFromCollection() throws Exception {
+    var request = new ConfigApi.GetZnodeVersion(IndexType.COLLECTION, COLLECTION_NAME);
+    var response = request.process(cluster.getSolrClient());
+
+    assertNotNull(response);
+    assertNull(response.error);
+    assertNotNull(response.znodeVersion);
+    assertTrue(response.znodeVersion.overlay >= -1);
+    assertTrue(response.znodeVersion.params >= -1);
+  }
 }
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/api/GetConfigTest.java b/solr/core/src/test/org/apache/solr/handler/admin/api/GetConfigTest.java
index c122e8d497a..a17d9258a18 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/api/GetConfigTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/api/GetConfigTest.java
@@ -56,4 +56,28 @@ public class GetConfigTest extends SolrTestCase {
     assertTrue(response.config.containsKey("searchComponent"));
     assertTrue(response.config.containsKey("updateProcessor"));
   }
+
+  @Test
+  public void testGetOverlayFromCore() throws Exception {
+    var request = new ConfigApi.GetOverlay(IndexType.CORE, CORE_NAME);
+    var response = request.process(solrTestRule.getSolrClient(CORE_NAME));
+
+    assertNotNull(response);
+    assertNull(response.error);
+    assertNotNull(response.overlay);
+    assertTrue(response.overlay.containsKey("znodeVersion"));
+    assertEquals(-1, response.overlay.get("znodeVersion"));
+  }
+
+  @Test
+  public void testGetZnodeVersionFromCore() throws Exception {
+    var request = new ConfigApi.GetZnodeVersion(IndexType.CORE, CORE_NAME);
+    var response = request.process(solrTestRule.getSolrClient(CORE_NAME));
+
+    assertNotNull(response);
+    assertNull(response.error);
+    assertNotNull(response.znodeVersion);
+    assertTrue(response.znodeVersion.overlay >= -1);
+    assertTrue(response.znodeVersion.params >= -1);
+  }
 }
diff --git a/solr/solrj/src/resources/java-template/api.mustache b/solr/solrj/src/resources/java-template/api.mustache
index 4aae4828561..b8c0dce8168 100644
--- a/solr/solrj/src/resources/java-template/api.mustache
+++ b/solr/solrj/src/resources/java-template/api.mustache
@@ -233,14 +233,14 @@ public class {{classname}} {
 
             @Override
             public SolrParams getParams() {
-              final ModifiableSolrParams params = new ModifiableSolrParams();
+              final ModifiableSolrParams solrParams = new ModifiableSolrParams();
               {{#queryParams}}
               if ({{paramName}} != null) {
-                  {{#isArray}}{{paramName}}.forEach(v -> params.add("{{baseName}}", v{{^items.isString}}.toString(){{/items.isString}}));{{/isArray}}
-                  {{^isArray}}params.add("{{baseName}}", {{paramName}}{{^isString}}.toString(){{/isString}});{{/isArray}}
+                  {{#isArray}}{{paramName}}.forEach(v -> solrParams.add("{{baseName}}", v{{^items.isString}}.toString(){{/items.isString}}));{{/isArray}}
+                  {{^isArray}}solrParams.add("{{baseName}}", {{paramName}}{{^isString}}.toString(){{/isString}});{{/isArray}}
               }
               {{/queryParams}}
-              return params;
+              return solrParams;
             }
 
             @Override


(solr) 07/11: SOLR-15395: Introduce coloured dots that update every ten seconds for health. (#5045)

Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 3bbb73659b2fbe38ee7e0780bf54379a0ee9019d
Author: Eric Pugh <ep...@opensourceconnections.com>
AuthorDate: Sat Oct 10 07:50:59 2026 -0400

    SOLR-15395: Introduce coloured dots that update every ten seconds for health. (#5045)
    
    (cherry picked from commit 3f5d4c5bf8ac96fec3a3219398b0c52c5418d48c)
---
 .../solr-15395-admin-ui-collection-health.yml      |   8 ++
 .../solr/webapp/AdminUiCollectionsScreenTest.java  |  20 +++
 solr/webapp/web/css/angular/collections.css        |  43 +++++++
 .../web/js/angular/controllers/collections.js      | 137 +++++++++++++++------
 solr/webapp/web/partials/collections.html          |   4 +-
 5 files changed, 172 insertions(+), 40 deletions(-)

diff --git a/changelog/unreleased/solr-15395-admin-ui-collection-health.yml b/changelog/unreleased/solr-15395-admin-ui-collection-health.yml
new file mode 100644
index 00000000000..5e0b010fc2c
--- /dev/null
+++ b/changelog/unreleased/solr-15395-admin-ui-collection-health.yml
@@ -0,0 +1,8 @@
+# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc
+title: Show collection and shard health (GREEN/YELLOW/ORANGE/RED, from SOLR-15300) as a colored dot in the Admin UI's Collections screen.
+type: added
+authors:
+  - name: Eric Pugh
+links:
+  - name: SOLR-15395
+    url: https://issues.apache.org/jira/browse/SOLR-15395
diff --git a/solr/webapp/src/test/org/apache/solr/webapp/AdminUiCollectionsScreenTest.java b/solr/webapp/src/test/org/apache/solr/webapp/AdminUiCollectionsScreenTest.java
index e8e44ad6ebd..83316587a81 100644
--- a/solr/webapp/src/test/org/apache/solr/webapp/AdminUiCollectionsScreenTest.java
+++ b/solr/webapp/src/test/org/apache/solr/webapp/AdminUiCollectionsScreenTest.java
@@ -46,6 +46,26 @@ public class AdminUiCollectionsScreenTest extends AdminUiTestBase {
     assertNoSevereConsoleErrors();
   }
 
+  @Test
+  public void testHealthStatusDisplay() {
+    openPage("~collections/" + COLLECTION, By.id("collections"));
+    waitForPageContains("shard1");
+
+    Map<String, By> healthDots =
+        Map.of(
+            "collection header", By.cssSelector("#collection-data h2 .health-dot"),
+            "shard header", By.cssSelector("#shard-data h2 .health-dot"));
+    healthDots.forEach(
+        (label, locator) -> {
+          WebElement dot = waitFor(locator);
+          assertTrue(
+              label + " health dot should be GREEN: " + dot.getAttribute("class"),
+              dot.getAttribute("class").contains("health-GREEN"));
+        });
+
+    assertNoSevereConsoleErrors();
+  }
+
   @Test
   public void testCreateAndDeleteCollectionViaUi() throws Exception {
     String name = "uicreated";
diff --git a/solr/webapp/web/css/angular/collections.css b/solr/webapp/web/css/angular/collections.css
index 41707493667..2518d065cf0 100644
--- a/solr/webapp/web/css/angular/collections.css
+++ b/solr/webapp/web/css/angular/collections.css
@@ -395,3 +395,46 @@ button.disabled
     /* styles when the element is disabled */
     color: #c0c0c0;
 }
+
+.health-dot {
+  display: inline-block;
+  width: 10px;
+  height: 10px;
+  border-radius: 50%;
+  margin: 0 6px;
+  vertical-align: middle;
+}
+
+#content #collections #data #collection-data h2
+{
+  display: flex;
+  align-items: center;
+}
+
+#content #collections #data #shard-data h2 .shard-name
+{
+  display: inline-flex;
+  align-items: center;
+}
+
+#content #collections #data #collection-data h2 .health-dot,
+#content #collections #data #shard-data h2 .shard-name .health-dot
+{
+  flex: 0 0 auto;
+}
+
+.health-dot.health-GREEN {
+  background-color: #57A957;
+}
+
+.health-dot.health-YELLOW {
+  background-color: #d5dd00;
+}
+
+.health-dot.health-ORANGE {
+  background-color: #c48f00;
+}
+
+.health-dot.health-RED {
+  background-color: #C43C35;
+}
diff --git a/solr/webapp/web/js/angular/controllers/collections.js b/solr/webapp/web/js/angular/controllers/collections.js
index 17707f34243..76c08a792d9 100644
--- a/solr/webapp/web/js/angular/controllers/collections.js
+++ b/solr/webapp/web/js/angular/controllers/collections.js
@@ -30,15 +30,80 @@ solrAdminApp.controller('CollectionsController',
             });
           });
 
-          CollectionsV2.listCollections({detailed: true}, function (error, data, response) {
+          // Just names for the sidebar/alias-picker - the detailed per-collection data
+          // (shards, replicas, health) for whichever one is selected is fetched separately
+          // below, narrowed to that one collection, instead of fetching detail for all of them.
+          CollectionsV2.listCollections({}, function (error, data, response) {
             $timeout(function() {
               if (error) { ApiErrorHandler.handle(response); return; }
               $scope.collections = [];
-              for (var name in data.collectionsDetail) {
+              for (var i in data.collections) {
+                  var name = data.collections[i];
                   if (name.startsWith("._designer_")) {
                       continue;
                   }
-                  var collection = data.collectionsDetail[name];
+                  $scope.collections.push({name: name});
+              }
+            });
+          });
+
+          $scope.refreshSelectedCollection();
+
+          // Fetch aliases using getAliases to get properties
+          AliasesV2.getAliases(function (error, adata, response) {
+              $timeout(function() {
+                  if (error) { ApiErrorHandler.handle(response); return; }
+                  // TODO: Population of aliases array duplicated in app.js
+                  $scope.aliases = [];
+                  for (var key in adata.aliases) {
+                      var props = {};
+                      if (key in adata.properties) {
+                          props = adata.properties[key];
+                      }
+                      var alias = {name: key, collections: adata.aliases[key], type: 'alias', properties: props};
+                      $scope.aliases.push(alias);
+                      if ($routeParams.collection == 'alias_' + key) {
+                          $scope.collection = alias;
+                      }
+                  }
+                  if ($routeParams.collection && $routeParams.collection.indexOf('alias_') === 0 && !$scope.collection) {
+                      alert("No collection or alias called " + $routeParams.collection);
+                      $location.path("/~collections");
+                  }
+              });
+          });
+
+          ConfigSetsV2.listConfigSet(function(error, data, response) {
+              $timeout(function() {
+                  if (error) { ApiErrorHandler.handle(response); return; }
+                  $scope.configs = [];
+                  var items = data.configSets;
+                  for (var i in items) {
+                      $scope.configs.push({name: items[i]});
+                  }
+              });
+          });
+
+          $timeout.cancel($scope.timeout);
+          $scope.timeout = $timeout($scope.refreshHealth, 10000);
+      };
+
+      // Fetches shard/replica detail for the single collection named by the route,
+      // narrowed server-side via the "collection" param instead of fetching every collection.
+      $scope.refreshSelectedCollection = function() {
+          var name = $routeParams.collection;
+          if (!name || name.indexOf('alias_') === 0) {
+              return;
+          }
+          CollectionsV2.listCollections({detailed: true, collection: name}, function(error, data, response) {
+              $timeout(function() {
+                  if (error) { ApiErrorHandler.handle(response); return; }
+                  var collection = data.collectionsDetail && data.collectionsDetail[name];
+                  if (!collection) {
+                      alert("No collection or alias called " + name);
+                      $location.path("/~collections");
+                      return;
+                  }
                   collection.name = name;
                   collection.type = 'collection';
                   var shards = collection.shards;
@@ -58,49 +123,44 @@ solrAdminApp.controller('CollectionsController',
                       }
                       collection.shards.push(shard);
                   }
-                  $scope.collections.push(collection);
-                  if ($routeParams.collection == name) {
-                      $scope.collection = collection;
-                  }
-              }
-              // Fetch aliases using getAliases to get properties
-              AliasesV2.getAliases(function (error, adata, response) {
-                  $timeout(function() {
-                      if (error) { ApiErrorHandler.handle(response); return; }
-                      // TODO: Population of aliases array duplicated in app.js
-                      $scope.aliases = [];
-                      for (var key in adata.aliases) {
-                          var props = {};
-                          if (key in adata.properties) {
-                              props = adata.properties[key];
-                          }
-                          var alias = {name: key, collections: adata.aliases[key], type: 'alias', properties: props};
-                          $scope.aliases.push(alias);
-                          if ($routeParams.collection == 'alias_' + key) {
-                              $scope.collection = alias;
-                          }
-                      }
-                      // Decide what is selected in list
-                      if ($routeParams.collection && !$scope.collection) {
-                          alert("No collection or alias called " + $routeParams.collection);
-                          $location.path("/~collections");
-                      }
-                  });
+                  $scope.collection = collection;
               });
-            });
           });
-          ConfigSetsV2.listConfigSet(function(error, data, response) {
+      };
+
+      // Patches health onto the selected collection in place, so it never disturbs expanded/open UI state.
+      $scope.refreshHealth = function() {
+          var name = $scope.collection && $scope.collection.type === 'collection' && $scope.collection.name;
+          if (!name) {
+              $scope.timeout = $timeout($scope.refreshHealth, 10000);
+              return;
+          }
+          CollectionsV2.listCollections({detailed: true, collection: name}, function(error, data, response) {
               $timeout(function() {
-                  if (error) { ApiErrorHandler.handle(response); return; }
-                  $scope.configs = [];
-                  var items = data.configSets;
-                  for (var i in items) {
-                      $scope.configs.push({name: items[i]});
+                  if (error) {
+                      ApiErrorHandler.handle(response);
+                  } else if ($scope.collection && $scope.collection.name === name) {
+                      var freshCollection = data.collectionsDetail && data.collectionsDetail[name];
+                      if (freshCollection) {
+                          $scope.collection.health = freshCollection.health;
+                          for (var shardName in freshCollection.shards) {
+                              var existingShard = $scope.collection.shards.find(function(s) { return s.name === shardName; });
+                              if (existingShard) {
+                                  existingShard.health = freshCollection.shards[shardName].health;
+                              }
+                          }
+                      }
                   }
+                  $scope.timeout = $timeout($scope.refreshHealth, 10000);
               });
           });
       };
 
+      var onRouteChangeOff = $scope.$on('$routeChangeStart', function() {
+          $timeout.cancel($scope.timeout);
+          onRouteChangeOff();
+      });
+
       $scope.hideAll = function() {
           $scope.showRename = false;
           $scope.showAdd = false;
@@ -242,6 +302,7 @@ solrAdminApp.controller('CollectionsController',
                  ApiErrorHandler.handle(response);
              } else {
                  $scope.reloadSuccess = true;
+                 $scope.refreshHealth();
              }
            });
         });
diff --git a/solr/webapp/web/partials/collections.html b/solr/webapp/web/partials/collections.html
index 8973d31562c..0ab8ce6b8fa 100644
--- a/solr/webapp/web/partials/collections.html
+++ b/solr/webapp/web/partials/collections.html
@@ -205,7 +205,7 @@ limitations under the License.
 
       <div class="block" id="collection-data" ng-show="collection.type === 'collection'">
 
-          <h2>Collection: {{collection.name}}</h2>
+          <h2>Collection: {{collection.name}} <span class="health-dot" ng-if="collection.health" ng-class="'health-' + collection.health" title="Health: {{collection.health}}"></span></h2>
 
           <div class="message-container">
               <div class="message"></div>
@@ -253,7 +253,7 @@ limitations under the License.
         <div class="content shard" ng-repeat="shard in collection.shards">
           <a ng-click="toggleShard(shard)">
             <h2>
-                  <span ng-class="{open:shard.show}"><b>Shard: {{shard.name}}</b></span>
+                  <span class="shard-name" ng-class="{open:shard.show}"><b>Shard: {{shard.name}}</b> <span class="health-dot" ng-if="shard.health" ng-class="'health-' + shard.health" title="Health: {{shard.health}}"></span></span>
                   <div style="float:right" ng-show="!shard.range || shard.state == 'inactive'"><a ng-click="toggleRemoveShard(shard)"><span class="rem"></span></a></div>
               </h2>
           </a>


(solr) 01/11: SOLR-18472 TikaServerExtractionBackend can hand out a reference to a stopped HttpClient (#4930)

Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 8c5991838cfcb60d755d2b48d1c318382f1ef51e
Author: Jan Høydahl <ja...@apache.org>
AuthorDate: Fri Oct 9 00:11:53 2026 +0200

    SOLR-18472 TikaServerExtractionBackend can hand out a reference to a stopped HttpClient (#4930)
    
    (cherry picked from commit dc441bc7bebdff99346c3761b0a5e55904a8bd6d)
---
 .../SOLR-18472-tikaserver-httpclient-refcount.yml  | 10 ++++
 .../extraction/TikaServerExtractionBackend.java    | 39 ++++++-------
 .../TikaServerExtractionBackendTest.java           | 65 ++++++++++++++++++++++
 3 files changed, 93 insertions(+), 21 deletions(-)

diff --git a/changelog/unreleased/SOLR-18472-tikaserver-httpclient-refcount.yml b/changelog/unreleased/SOLR-18472-tikaserver-httpclient-refcount.yml
new file mode 100644
index 00000000000..5caf01ba1fa
--- /dev/null
+++ b/changelog/unreleased/SOLR-18472-tikaserver-httpclient-refcount.yml
@@ -0,0 +1,10 @@
+title: >
+  Fixed a race in the Tika Server extraction backend where closing or reloading one core could leave
+  another core using a stopped HTTP client.
+type: fixed
+authors:
+  - name: Jan Høydahl
+    nick: janhoy
+links:
+  - name: SOLR-18472
+    url: https://issues.apache.org/jira/browse/SOLR-18472
diff --git a/solr/modules/extraction/src/java/org/apache/solr/handler/extraction/TikaServerExtractionBackend.java b/solr/modules/extraction/src/java/org/apache/solr/handler/extraction/TikaServerExtractionBackend.java
index a6d08bb11f7..2c422f7ebfe 100644
--- a/solr/modules/extraction/src/java/org/apache/solr/handler/extraction/TikaServerExtractionBackend.java
+++ b/solr/modules/extraction/src/java/org/apache/solr/handler/extraction/TikaServerExtractionBackend.java
@@ -33,6 +33,7 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicBoolean;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.util.ExecutorUtil;
 import org.apache.solr.common.util.NamedList;
@@ -67,11 +68,13 @@ public class TikaServerExtractionBackend implements ExtractionBackend {
   private HashMap<String, Object> initArgsMap = new HashMap<>();
   private final long maxCharsLimit;
 
-  // Singleton holder for the shared HttpClient/Executor resources (one per JVM)
-  private static volatile RefCounted<HttpClientResources> SHARED_RESOURCES;
+  // Singleton holder for the shared HttpClient/Executor resources (one per JVM), guarded by
+  // INIT_LOCK so that acquiring a reference cannot race with the last decref() closing it
+  private static RefCounted<HttpClientResources> SHARED_RESOURCES;
   // Per-backend handle (same RefCounted instance as SHARED_RESOURCES) that this instance will
   // decref() on close
-  private RefCounted<HttpClientResources> acquiredResourcesRef;
+  private final RefCounted<HttpClientResources> acquiredResourcesRef;
+  private final AtomicBoolean closed = new AtomicBoolean();
 
   public TikaServerExtractionBackend(String baseUrl) {
     this(baseUrl, DEFAULT_TIMEOUT_SECONDS, null, DEFAULT_MAXCHARS_LIMIT);
@@ -117,7 +120,7 @@ public class TikaServerExtractionBackend implements ExtractionBackend {
         Duration.ofSeconds(timeoutSeconds > 0 ? timeoutSeconds : DEFAULT_TIMEOUT_SECONDS);
 
     // Acquire a reference to the shared resources; keep a handle so we can decref() on close
-    acquiredResourcesRef = initializeHttpClient().incref();
+    acquiredResourcesRef = acquireSharedResources();
   }
 
   public static final String NAME = "tikaserver";
@@ -367,6 +370,7 @@ public class TikaServerExtractionBackend implements ExtractionBackend {
 
     @Override
     protected void close() {
+      assert Thread.holdsLock(INIT_LOCK);
       // stop client and shutdown executor
       try {
         if (resource.client != null) resource.client.stop();
@@ -376,20 +380,16 @@ public class TikaServerExtractionBackend implements ExtractionBackend {
         if (resource.executor != null) resource.executor.shutdownNow();
       } catch (Throwable ignore) {
       }
-      synchronized (INIT_LOCK) {
-        // clear the shared reference when closed
-        if (SHARED_RESOURCES == this) {
-          SHARED_RESOURCES = null;
-        }
+      // clear the shared reference when closed
+      if (SHARED_RESOURCES == this) {
+        SHARED_RESOURCES = null;
       }
     }
   }
 
-  private static RefCounted<HttpClientResources> initializeHttpClient() {
-    RefCounted<HttpClientResources> ref = SHARED_RESOURCES;
-    if (ref != null) return ref;
+  private static RefCounted<HttpClientResources> acquireSharedResources() {
     synchronized (INIT_LOCK) {
-      if (SHARED_RESOURCES != null) return SHARED_RESOURCES;
+      if (SHARED_RESOURCES != null) return SHARED_RESOURCES.incref();
       ThreadFactory tf = new SolrNamedThreadFactory("TikaServerHttpClient");
       ExecutorService exec = ExecutorUtil.newMDCAwareCachedThreadPool(tf);
       HttpClient client = new HttpClient();
@@ -406,7 +406,7 @@ public class TikaServerExtractionBackend implements ExtractionBackend {
             SolrException.ErrorCode.SERVER_ERROR, "Failed to start shared Jetty HttpClient", e);
       }
       SHARED_RESOURCES = new ResourcesRef(new HttpClientResources(client, exec));
-      return SHARED_RESOURCES;
+      return SHARED_RESOURCES.incref();
     }
   }
 
@@ -447,13 +447,10 @@ public class TikaServerExtractionBackend implements ExtractionBackend {
 
   @Override
   public void close() {
-    RefCounted<HttpClientResources> ref;
-    synchronized (INIT_LOCK) {
-      ref = acquiredResourcesRef;
-      acquiredResourcesRef = null;
-    }
-    if (ref != null) {
-      ref.decref();
+    if (closed.compareAndSet(false, true)) {
+      synchronized (INIT_LOCK) {
+        acquiredResourcesRef.decref();
+      }
     }
   }
 }
diff --git a/solr/modules/extraction/src/test/org/apache/solr/handler/extraction/TikaServerExtractionBackendTest.java b/solr/modules/extraction/src/test/org/apache/solr/handler/extraction/TikaServerExtractionBackendTest.java
index 326ab818596..4505a346fe4 100644
--- a/solr/modules/extraction/src/test/org/apache/solr/handler/extraction/TikaServerExtractionBackendTest.java
+++ b/solr/modules/extraction/src/test/org/apache/solr/handler/extraction/TikaServerExtractionBackendTest.java
@@ -24,10 +24,15 @@ import java.nio.file.Files;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.concurrent.CyclicBarrier;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
 import org.apache.lucene.tests.util.QuickPatchThreadsFilter;
 import org.apache.solr.SolrIgnoredThreadsFilter;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.SolrException;
+import org.apache.solr.common.util.ExecutorUtil;
+import org.apache.solr.common.util.SolrNamedThreadFactory;
 import org.apache.solr.handler.extraction.fromtika.ToXMLContentHandler;
 import org.junit.ClassRule;
 import org.junit.Test;
@@ -195,4 +200,64 @@ public class TikaServerExtractionBackendTest extends SolrTestCaseJ4 {
       }
     }
   }
+
+  /**
+   * Races the last backend's close() (which stops the shared HttpClient) against construction of a
+   * new backend, which must end up with a working client rather than the one being stopped.
+   */
+  @Test
+  public void testConcurrentCloseAndAcquireSharedResources() throws Exception {
+    String baseUrl = tikaContainer.getBaseUrl();
+    int iterations = atLeast(25);
+    ExecutorService exec =
+        ExecutorUtil.newMDCAwareFixedThreadPool(2, new SolrNamedThreadFactory("tikaRace"));
+    try {
+      for (int i = 0; i < iterations; i++) {
+        TikaServerExtractionBackend last = new TikaServerExtractionBackend(baseUrl);
+        CyclicBarrier barrier = new CyclicBarrier(2);
+        Future<?> closer =
+            exec.submit(
+                () -> {
+                  barrier.await();
+                  last.close();
+                  return null;
+                });
+        Future<TikaServerExtractionBackend> opener =
+            exec.submit(
+                () -> {
+                  barrier.await();
+                  return new TikaServerExtractionBackend(baseUrl);
+                });
+        closer.get();
+        try (TikaServerExtractionBackend fresh = opener.get()) {
+          assertExtracts(fresh, "iteration " + i);
+        }
+      }
+    } finally {
+      ExecutorUtil.shutdownAndAwaitTermination(exec);
+    }
+  }
+
+  @Test
+  public void testCloseIsIdempotent() throws Exception {
+    String baseUrl = tikaContainer.getBaseUrl();
+    TikaServerExtractionBackend first = new TikaServerExtractionBackend(baseUrl);
+    try (TikaServerExtractionBackend second = new TikaServerExtractionBackend(baseUrl)) {
+      first.close();
+      first.close();
+      assertExtracts(second, "after double close");
+    }
+    try (TikaServerExtractionBackend third = new TikaServerExtractionBackend(baseUrl)) {
+      assertExtracts(third, "after all closed");
+    }
+  }
+
+  private void assertExtracts(TikaServerExtractionBackend backend, String marker) throws Exception {
+    byte[] data = ("Hello " + marker).getBytes(StandardCharsets.UTF_8);
+    try (ByteArrayInputStream in = new ByteArrayInputStream(data)) {
+      ExtractionResult res = backend.extract(in, newRequest("test.txt", "text/plain", "text"));
+      assertNotNull(res);
+      assertTrue(res.getContent().contains("Hello " + marker));
+    }
+  }
 }


(solr) 08/11: SOLR-16396: Replace the GET /config/{component} wildcards with explicit paths (#5097)

Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 3bf98773bd9cdd1442927638c479a130bde40c44
Author: Jalaz Kumar <ja...@gmail.com>
AuthorDate: Sun Oct 11 06:43:16 2026 +0530

    SOLR-16396: Replace the GET /config/{component} wildcards with explicit paths (#5097)
    
    (cherry picked from commit d76fc14b9857e77b830d7a82514b28c523a239c2)
---
 .../solr/handler/admin/api/GetConfigAPI.java       | 38 ++++++++++++++++++++--
 .../solr/handler/admin/V2ConfigAPIMappingTest.java |  2 ++
 2 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/handler/admin/api/GetConfigAPI.java b/solr/core/src/java/org/apache/solr/handler/admin/api/GetConfigAPI.java
index 4dab3ed7459..2a2db95683e 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/api/GetConfigAPI.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/api/GetConfigAPI.java
@@ -54,9 +54,43 @@ public class GetConfigAPI {
     configHandler.handleRequest(req, rsp);
   }
 
-  // This endpoint currently covers a whole list of paths by using the "component" placeholder
+  // GET /config/... sections still via SolrConfigHandler.
+  // Every name SolrConfig.writeMap can emit.
+  // Delete a path from this list when that section is migrated to Jersey
   @EndPoint(
-      path = {"/config/{component}"},
+      path = {
+        "/config/overlay",
+        "/config/znodeVersion",
+        "/config/luceneMatchVersion",
+        "/config/query",
+        "/config/requestHandler",
+        "/config/searchComponent",
+        "/config/updateHandler",
+        "/config/queryResponseWriter",
+        "/config/initParams",
+        "/config/listener",
+        "/config/directoryFactory",
+        "/config/indexConfig",
+        "/config/codecFactory",
+        "/config/requestDispatcher",
+        "/config/jmx",
+        "/config/queryParser",
+        "/config/valueSourceParser",
+        "/config/transformer",
+        "/config/updateProcessor",
+        "/config/updateRequestProcessorChain",
+        "/config/queryConverter",
+        "/config/cache",
+        "/config/circuitBreaker",
+        "/config/expressible",
+        "/config/schemaFactory",
+        "/config/restManager",
+        "/config/statsCache",
+        "/config/recoveryStrategy",
+        "/config/indexReaderFactory",
+        "/config/indexConfigdeletionPolicy",
+        "/config/updateHandlerupdateLog"
+      },
       method = GET,
       permission = CONFIG_READ_PERM)
   public void getComponentConfig(SolrQueryRequest req, SolrQueryResponse rsp) {
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/V2ConfigAPIMappingTest.java b/solr/core/src/test/org/apache/solr/handler/admin/V2ConfigAPIMappingTest.java
index 0a5aaab1f88..0498b25dd5c 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/V2ConfigAPIMappingTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/V2ConfigAPIMappingTest.java
@@ -55,6 +55,8 @@ public class V2ConfigAPIMappingTest extends V2ApiMappingTest<SolrConfigHandler>
     assertAnnotatedApiExistsFor("GET", "/config/requestDispatcher");
     assertAnnotatedApiExistsFor("GET", "/config/znodeVersion");
     assertAnnotatedApiExistsFor("GET", "/config/luceneMatchVersion");
+    assertAnnotatedApiExistsFor("GET", "/config/indexConfigdeletionPolicy");
+    assertAnnotatedApiExistsFor("GET", "/config/updateHandlerupdateLog");
   }
 
   @Test


(solr) 06/11: SOLR-16640: Admin UI's SQL screen shows an error instead of crashing (#5057)

Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 170419f08badb0ec42f8fe13427e0f8e683ea7e2
Author: Eric Pugh <ep...@opensourceconnections.com>
AuthorDate: Sat Oct 10 07:49:58 2026 -0400

    SOLR-16640: Admin UI's SQL screen shows an error instead of crashing (#5057)
    
    (cherry picked from commit cdc1707abb4d1071b880236fe418cb17d7729e50)
---
 .../solr-16640-admin-ui-sql-error-handling.yml     |  8 ++
 .../java/org/apache/solr/cli/RunExampleTool.java   |  2 +-
 .../apache/solr/webapp/AdminUiSqlScreenTest.java   | 52 +++++++++++--
 solr/webapp/web/js/angular/controllers/sqlquery.js | 85 ++++++++++++++--------
 solr/webapp/web/partials/sqlquery.html             |  5 +-
 5 files changed, 114 insertions(+), 38 deletions(-)

diff --git a/changelog/unreleased/solr-16640-admin-ui-sql-error-handling.yml b/changelog/unreleased/solr-16640-admin-ui-sql-error-handling.yml
new file mode 100644
index 00000000000..9a628d567e5
--- /dev/null
+++ b/changelog/unreleased/solr-16640-admin-ui-sql-error-handling.yml
@@ -0,0 +1,8 @@
+# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc
+title: Admin UI's SQL screen no longer crashes with an uncaught JS error (and silently shows a blank result grid) when the response isn't a SQL result-set - e.g. when the sql module/handler isn't installed. It now shows the server's error message instead.
+type: fixed
+authors:
+  - name: Eric Pugh
+links:
+  - name: SOLR-16640
+    url: https://issues.apache.org/jira/browse/SOLR-16640
diff --git a/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java b/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java
index 9dddc9938d3..66828271c06 100644
--- a/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java
+++ b/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java
@@ -1026,7 +1026,7 @@ public class RunExampleTool extends ToolBase {
 
     final var syspropArg =
         ("techproducts".equals(params.example()))
-            ? "-Dsolr.modules=clustering,extraction,langid,ltr,scripting -Dsolr.ltr.enabled=true -Dsolr.clustering.enabled=true"
+            ? "-Dsolr.modules=clustering,extraction,langid,ltr,scripting,sql -Dsolr.ltr.enabled=true -Dsolr.clustering.enabled=true"
             : "";
 
     String startCmdStr =
diff --git a/solr/webapp/src/test/org/apache/solr/webapp/AdminUiSqlScreenTest.java b/solr/webapp/src/test/org/apache/solr/webapp/AdminUiSqlScreenTest.java
index c49871834ce..837ddb5439e 100644
--- a/solr/webapp/src/test/org/apache/solr/webapp/AdminUiSqlScreenTest.java
+++ b/solr/webapp/src/test/org/apache/solr/webapp/AdminUiSqlScreenTest.java
@@ -16,17 +16,16 @@
  */
 package org.apache.solr.webapp;
 
+import java.util.Locale;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.common.SolrInputDocument;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.openqa.selenium.By;
+import org.openqa.selenium.JavascriptExecutor;
 import org.openqa.selenium.WebElement;
 
-/**
- * Tests the SQL screen: executing a SQL query through the form. Requires the sql module on the
- * server classpath, provided by the webapp test dependencies.
- */
+/** Browser tests for the SQL screen. The test classpath includes the sql module. */
 public class AdminUiSqlScreenTest extends AdminUiTestBase {
 
   private static final String COLLECTION = "sqlcoll";
@@ -51,10 +50,53 @@ public class AdminUiSqlScreenTest extends AdminUiTestBase {
     stmt.sendKeys("SELECT id FROM " + COLLECTION + " LIMIT 10");
     click(By.xpath("//div[@id='sqlquery']//button[@type='submit']"));
 
-    // the result grid lists all documents
     for (int i = 1; i <= 3; i++) {
       waitForPageContains("sql-doc-" + i);
     }
     assertNoSevereConsoleErrors();
   }
+
+  @Test
+  public void testFailedRequestShowsErrorInsteadOfCrashing() {
+    // A missing collection produces an error response without a result-set.
+    openPage("nonexistentcoll/sqlquery", By.id("sqlquery"));
+    WebElement stmt = waitFor(By.id("sqlexp"));
+    stmt.clear();
+    stmt.sendKeys("SELECT id FROM " + COLLECTION + " LIMIT 10");
+    click(By.xpath("//div[@id='sqlquery']//button[@type='submit']"));
+    waitForTextContains(By.id("sql-response"), "no handler, collection, or core");
+    assertNoSevereConsoleErrors("404 (Not Found)");
+  }
+
+  @Test
+  public void testSqlModuleNotEnabledShowsFriendlyMessage() {
+    // Use a captured missing-module response because the test classpath includes the sql module.
+    openPage(COLLECTION + "/sqlquery", By.id("sqlquery"));
+    waitFor(By.id("sqlexp"));
+    String classNotFoundResponse =
+        "{\"error\":{\"metadata\":{\"error-class\":\"org.apache.solr.common.SolrException\","
+            + "\"root-error-class\":\"java.lang.ClassNotFoundException\"},"
+            + "\"errorClass\":\"org.apache.solr.common.SolrException\","
+            + "\"msg\":\" Error loading class 'solr.SQLHandler'\",\"code\":500}}";
+    String sqlError =
+        (String)
+            ((JavascriptExecutor) driver)
+                .executeScript(
+                    "var scope = angular.element(document.getElementById('sqlquery')).scope();"
+                        + "scope.showResult(arguments[0]);"
+                        + "scope.$apply();"
+                        + "return scope.sqlError;",
+                    classNotFoundResponse);
+    assertTrue(
+        "should show a friendly message, got: " + sqlError,
+        sqlError != null && sqlError.toLowerCase(Locale.ROOT).contains("sql module"));
+    assertTrue(
+        "should say how to fix it: " + sqlError,
+        sqlError.toLowerCase(Locale.ROOT).contains("enable"));
+    WebElement documentation = waitFor(By.cssSelector("#sql-response span a"));
+    assertEquals(
+        "https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html",
+        documentation.getDomAttribute("href"));
+    assertEquals("_out", documentation.getDomAttribute("target"));
+  }
 }
diff --git a/solr/webapp/web/js/angular/controllers/sqlquery.js b/solr/webapp/web/js/angular/controllers/sqlquery.js
index 7aabc887d5e..b8057dd8e60 100644
--- a/solr/webapp/web/js/angular/controllers/sqlquery.js
+++ b/solr/webapp/web/js/angular/controllers/sqlquery.js
@@ -31,6 +31,55 @@ solrAdminApp.controller('SQLQueryController',
         }
     };
     $scope.hostPortContext = $location.absUrl().substr(0,$location.absUrl().indexOf("#")); // For display only
+
+    // The global interceptor can route errors to the success callback, so handle both here.
+    $scope.showResult = function(raw) {
+      $scope.lang = "json";
+      $scope.sqlError = null;
+      $scope.sqlModuleMissing = false;
+      $scope.sqlData = [];
+
+      var jsonData;
+      try {
+        jsonData = JSON.parse(raw);
+      } catch (e) {
+        $scope.sqlError = raw;
+        return;
+      }
+
+      var docs = jsonData && jsonData['result-set'] && jsonData['result-set'].docs;
+      if (!docs) {
+        var err = jsonData && jsonData.error;
+        if (err && err.metadata && err.metadata['root-error-class'] === 'java.lang.ClassNotFoundException'
+            && err.msg && err.msg.indexOf('SQLHandler') !== -1) {
+          $scope.sqlModuleMissing = true;
+          $scope.sqlError = "The sql module doesn't appear to be enabled on this Solr node.";
+        } else {
+          $scope.sqlError = (jsonData && jsonData.message) || (err && err.msg) || raw;
+        }
+        return;
+      }
+
+      for (var i = 0; i < docs.length; i++) {
+          var doc = docs[i]
+          if(doc.hasOwnProperty("EOF")){
+              if(doc.hasOwnProperty("EXCEPTION")){
+                  $scope.sqlError = doc.EXCEPTION
+              }
+          } else {
+              $scope.gridOptions.data.push(doc);
+          }
+      }
+      // Build grid columns from the result fields.
+      var fields = $scope.gridOptions.data[1];
+      for (var property in fields) {
+          if (fields.hasOwnProperty(property)) {
+              $scope.gridOptions.columnDefs.push({"name":property, "type":{}})
+          }
+      }
+      $scope.gridApi.core.notifyDataChange
+    };
+
     $scope.doQuery = function() {
 
       var params = {};
@@ -47,41 +96,15 @@ solrAdminApp.controller('SQLQueryController',
 
       $scope.lang = "json";
       $scope.response = null;
-      $scope.url = "";
       $scope.gridOptions.data =[]
       $scope.gridOptions.columnDefs = []
 
-      var url = Query.url(params);
-      Query.query(params, function(data) {
+      $scope.url = Query.url(params);
 
-        var jsonData = JSON.parse(data.toJSON().data);
-        $scope.lang = "json";
-        $scope.url = url;
-        $scope.sqlError = null;
-        $scope.sqlData = [];
-          if(jsonData != undefined){
-              var docs = jsonData['result-set'].docs
-              //get all docs
-              for (var i = 0; i < docs.length; i++) {
-                  var doc = docs[i]
-                  //get all the properties
-                  if(doc.hasOwnProperty("EOF")){
-                      if(doc.hasOwnProperty("EXCEPTION")){
-                          $scope.sqlError = doc.EXCEPTION
-                      }
-                  } else {
-                      $scope.gridOptions.data.push(doc);
-                  }
-              }
-          }
-          //Build the columnFields from data
-          var fields = $scope.gridOptions.data[1];
-          for (var property in fields) {
-              if (fields.hasOwnProperty(property)) {
-                  $scope.gridOptions.columnDefs.push({"name":property, "type":{}})
-              }
-          }
-          $scope.gridApi.core.notifyDataChange
+      Query.query(params, function(data) {
+        $scope.showResult(data.toJSON().data);
+      }, function(rejection) {
+        $scope.showResult((rejection.data && rejection.data.data) || ("HTTP " + rejection.status + " " + rejection.statusText));
       });
     };
   }
diff --git a/solr/webapp/web/partials/sqlquery.html b/solr/webapp/web/partials/sqlquery.html
index c0254d13ac3..76a2506c061 100644
--- a/solr/webapp/web/partials/sqlquery.html
+++ b/solr/webapp/web/partials/sqlquery.html
@@ -28,7 +28,10 @@ limitations under the License.
   </div>
   <div id="sql-response">
     <a ng-show="sqlData" id="url" class="address-bar" ng-href="{{url}}">{{hostPortContext}}{{url}}</a>
-    <div ng-show="sqlError"> {{sqlError}}</div>
+    <div ng-show="sqlError">
+      {{sqlError}}
+      <span ng-if="sqlModuleMissing">See <a href="https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html" target="_out">SQL documentation</a> for how to enable it.</span>
+    </div>
     <div ng-show="!sqlError" class="grid" ui-grid="gridOptions" id="sql-response"></div>
 
   </div>


(solr) 02/11: SOLR-9759: Admin UI should post streaming expressions (#5048)

Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit aa3cafb3c6e000ccd52fb56ef36371e06a4e2984
Author: Eric Pugh <ep...@opensourceconnections.com>
AuthorDate: Thu Oct 8 18:46:48 2026 -0400

    SOLR-9759: Admin UI should post streaming expressions (#5048)
    
    (cherry picked from commit c6f910d3ccf188a10fbe155ad6253b5236b4a6dc)
---
 .../unreleased/solr-9759-admin-ui-stream-post.yml  |  8 +++++
 .../solr/webapp/AdminUiStreamScreenTest.java       | 41 ++++++++++++++++++++++
 solr/webapp/web/js/angular/controllers/stream.js   | 37 +++++++++++--------
 solr/webapp/web/js/angular/services.js             | 39 +++++++++++++-------
 4 files changed, 99 insertions(+), 26 deletions(-)

diff --git a/changelog/unreleased/solr-9759-admin-ui-stream-post.yml b/changelog/unreleased/solr-9759-admin-ui-stream-post.yml
new file mode 100644
index 00000000000..67bf904139d
--- /dev/null
+++ b/changelog/unreleased/solr-9759-admin-ui-stream-post.yml
@@ -0,0 +1,8 @@
+# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc
+title: Admin UI's Stream screen now posts the streaming expression as a form-encoded body instead of a GET query-string parameter, so large expressions no longer silently fail, and a failed request now shows an error instead of leaving the screen blank.
+type: fixed
+authors:
+  - name: Eric Pugh
+links:
+  - name: SOLR-9759
+    url: https://issues.apache.org/jira/browse/SOLR-9759
diff --git a/solr/webapp/src/test/org/apache/solr/webapp/AdminUiStreamScreenTest.java b/solr/webapp/src/test/org/apache/solr/webapp/AdminUiStreamScreenTest.java
index b348120bceb..3abec954fdc 100644
--- a/solr/webapp/src/test/org/apache/solr/webapp/AdminUiStreamScreenTest.java
+++ b/solr/webapp/src/test/org/apache/solr/webapp/AdminUiStreamScreenTest.java
@@ -21,6 +21,7 @@ import org.apache.solr.common.SolrInputDocument;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.openqa.selenium.By;
+import org.openqa.selenium.JavascriptExecutor;
 import org.openqa.selenium.WebElement;
 
 /** Tests the Stream screen: executing a streaming expression through the form. */
@@ -51,4 +52,44 @@ public class AdminUiStreamScreenTest extends AdminUiTestBase {
     assertTrue("All docs should stream: " + response, response.contains("stream-doc-3"));
     assertNoSevereConsoleErrors();
   }
+
+  @Test
+  public void testLargeExpressionSucceedsViaUi() {
+    // A streaming expression large enough that a GET request's URL/header would be rejected by
+    // Jetty before ever reaching Solr (SOLR-9759) - a single wildcard clause keeps it one simple
+    // query (matching nothing, since no real id starts with this), so a clean zero-hit response
+    // (rather than a hang, a truncated request, or a parse error) confirms the whole POST body
+    // round-tripped intact.
+    String padding = "a".repeat(20000);
+    String expression =
+        "search(" + COLLECTION + ",q=\"*:*\",fl=\"id\",sort=\"id asc\",fq=\"id:" + padding + "*\")";
+    assertTrue(
+        "test expression should exceed a typical 8K header/URL limit", expression.length() > 16384);
+
+    openPage(COLLECTION + "/stream", By.id("stream"));
+    WebElement expr = waitFor(By.id("expr"));
+    ((JavascriptExecutor) driver)
+        .executeScript(
+            "arguments[0].value = arguments[1];"
+                + "arguments[0].dispatchEvent(new Event('input', {bubbles: true}));",
+            expr,
+            expression);
+    click(By.cssSelector("#stream button[type=submit]"));
+    waitForTextContains(By.cssSelector("#stream #result"), "EOF");
+    assertNoSevereConsoleErrors();
+  }
+
+  @Test
+  public void testFailedRequestShowsErrorInsteadOfHanging() {
+    // a nonexistent collection makes the request fail - confirms a failed request surfaces
+    // something in the UI instead of leaving the screen blank forever (the original bug).
+    openPage("nonexistentcoll/stream", By.id("stream"));
+    WebElement expr = waitFor(By.id("expr"));
+    expr.clear();
+    expr.sendKeys("search(" + COLLECTION + ",q=\"*:*\",fl=\"id\",sort=\"id asc\")");
+    click(By.cssSelector("#stream button[type=submit]"));
+    waitForTextContains(By.cssSelector("#stream #result"), "no handler, collection, or core");
+    // the request is expected to fail (404) - that's the scenario under test
+    assertNoSevereConsoleErrors("404 (Not Found)");
+  }
 }
diff --git a/solr/webapp/web/js/angular/controllers/stream.js b/solr/webapp/web/js/angular/controllers/stream.js
index f8001d84ffe..56faeb4d6d5 100644
--- a/solr/webapp/web/js/angular/controllers/stream.js
+++ b/solr/webapp/web/js/angular/controllers/stream.js
@@ -41,27 +41,36 @@ solrAdminApp.controller('StreamController',
       $scope.response = null;
       $scope.url = "";
 
+      // Shown for reference only - the request is actually sent as a POST body below, since a
+      // streaming expression can be too large for a URL/header (SOLR-9759).
       var url = Query.url(params);
 
-      Query.query(params, function(data) {
-
-        var jsonData = JSON.parse(data.toJSON().data);
-        if (undefined != jsonData["explanation"]) {
-          $scope.showExplanation = true;
-
-          streamGraphSubController($scope, jsonData["explanation"])
-          delete jsonData["explanation"]
-        } else {
-          $scope.showExplanation = false;
+      // Handles both the success and error callbacks below: app.js's global interceptor
+      // (see failed()'s doNotIntercept branch) routes most failures for this request through
+      // the "success" callback too, so this must defend against a non-JSON body either way.
+      var showResult = function(raw) {
+        $scope.showExplanation = false;
+        try {
+          var jsonData = JSON.parse(raw);
+          if (undefined != jsonData["explanation"]) {
+            $scope.showExplanation = true;
+            streamGraphSubController($scope, jsonData["explanation"]);
+            delete jsonData["explanation"];
+          }
+          raw = JSON.stringify(jsonData, null, 2);
+        } catch (e) {
+          // not JSON (e.g. a raw HTTP error page) - show it as-is rather than crashing
         }
-
-        data.data = JSON.stringify(jsonData,null,2);
-
         $scope.lang = "json";
-        $scope.response = data;
+        $scope.response = {data: raw};
         $scope.url = url;
         $scope.hostPortContext = $location.absUrl().substr(0,$location.absUrl().indexOf("#")); // For display only
+      };
 
+      Query.queryPost({core: params.core, handler: params.handler}, params, function(data) {
+        showResult(data.toJSON().data);
+      }, function(rejection) {
+        showResult((rejection.data && rejection.data.data) || ("HTTP " + rejection.status + " " + rejection.statusText));
       });
     };
 
diff --git a/solr/webapp/web/js/angular/services.js b/solr/webapp/web/js/angular/services.js
index 462d684121e..a088e1c1c6f 100644
--- a/solr/webapp/web/js/angular/services.js
+++ b/solr/webapp/web/js/angular/services.js
@@ -355,25 +355,40 @@ solrAdminServices.factory('Metrics',
   }])
 .factory('Query',
     ['$resource', function($resource) {
-       var resource = $resource(':core/:handler', {core: '@core', handler: '@handler', '_':Date.now()}, {
-           "query": {
-             method: "GET",
-             transformResponse: function (data) {
-               return {data: data}
-             },
-             headers: {doNotIntercept: "true"}
-           }
-       });
-       resource.url = function(params) {
+       var toQueryString = function(params) {
            var qs = [];
-           for (key in params) {
+           for (var key in params) {
                if (key != "core" && key != "handler") {
                    for (var i in params[key]) {
                        qs.push(key + "=" + encodeURIComponent(params[key][i]));
                    }
                }
            }
-           return "" + params.core + "/" + params.handler + "?" + qs.sort().join("&");
+           return qs.sort().join("&");
+       }
+       var wrapRawResponse = function(data) {
+           return {data: data}
+       }
+       var resource = $resource(':core/:handler', {core: '@core', handler: '@handler', '_':Date.now()}, {
+           "query": {
+             method: "GET",
+             transformResponse: wrapRawResponse,
+             headers: {doNotIntercept: "true"}
+           },
+           // Same request as "query" above, but as a form-encoded POST body instead of a query
+           // string - for request params (e.g. a streaming expression) too large for a URL/header.
+           "queryPost": {
+             method: "POST",
+             transformRequest: toQueryString,
+             transformResponse: wrapRawResponse,
+             headers: {
+               'Content-Type': 'application/x-www-form-urlencoded',
+               doNotIntercept: "true"
+             }
+           }
+       });
+       resource.url = function(params) {
+           return "" + params.core + "/" + params.handler + "?" + toQueryString(params);
        }
        return resource;
 }])


(solr) 11/11: SOLR-18498: Start the Core Admin examples in user-managed mode (#5122)

Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 0923eae38c1c9cf2a1f7b9866e553f911afb6d45
Author: Serhiy Bzhezytskyy <me...@serhiy-bzhezytskyy.com>
AuthorDate: Tue Oct 13 18:04:58 2026 +0300

    SOLR-18498: Start the Core Admin examples in user-managed mode (#5122)
    
    (cherry picked from commit d38e0f1623728bdd305e76a598f013f1bf32e449)
---
 .../modules/configuration-guide/pages/coreadmin-api.adoc            | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/solr/solr-ref-guide/modules/configuration-guide/pages/coreadmin-api.adoc b/solr/solr-ref-guide/modules/configuration-guide/pages/coreadmin-api.adoc
index a7d2e78a612..bffe7d94f0b 100644
--- a/solr/solr-ref-guide/modules/configuration-guide/pages/coreadmin-api.adoc
+++ b/solr/solr-ref-guide/modules/configuration-guide/pages/coreadmin-api.adoc
@@ -30,14 +30,14 @@ CoreAdmin actions can be executed by via HTTP requests that specify an `action`
 
 All action names are uppercase, and are defined in depth in the sections below.
 
-All of the examples in this section assume you are running the "techproducts" Solr example:
+All of the examples in this section assume you are running the "techproducts" Solr example in user-managed mode:
 
 [source,bash]
 ----
-bin/solr start -DconfigSetBaseDir=./server/solr/configsets -e techproducts
+bin/solr start --user-managed -e techproducts
 ----
 
-We are passing in the explicit relative path for the `configSetBaseDir` to enable creating new cores using the `sample_techproducts_configs` configset in the examples below.
+The `sample_techproducts_configs` configset used to create new cores in the examples below is found in the default `configsets` directory of the Solr home.
 
 [[coreadmin-status]]
 == STATUS


(solr) 10/11: SOLR-18499: Drop the _introspect section from the v2 API page (#5123)

Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 09647735fb6e3e7c137eb81feb81420409178558
Author: Serhiy Bzhezytskyy <me...@serhiy-bzhezytskyy.com>
AuthorDate: Tue Oct 13 16:19:43 2026 +0300

    SOLR-18499: Drop the _introspect section from the v2 API page (#5123)
    
    (cherry picked from commit cf4a66669d37a308ac02bfd0211abe1897330df7)
---
 .../modules/configuration-guide/pages/v2-api.adoc  | 104 ++-------------------
 1 file changed, 10 insertions(+), 94 deletions(-)

diff --git a/solr/solr-ref-guide/modules/configuration-guide/pages/v2-api.adoc b/solr/solr-ref-guide/modules/configuration-guide/pages/v2-api.adoc
index 6d0e6c0e60d..405c250a957 100644
--- a/solr/solr-ref-guide/modules/configuration-guide/pages/v2-api.adoc
+++ b/solr/solr-ref-guide/modules/configuration-guide/pages/v2-api.adoc
@@ -17,19 +17,18 @@
 // under the License.
 
 [[top-v2-api]]
-The v2 API is a modernized self-documenting API interface covering most current Solr APIs.
+The v2 API is a modernized API interface covering most current Solr APIs.
 It is anticipated that once the v2 API reaches full coverage, and Solr-internal API usages like SolrJ and the Admin UI have been converted from the old API to the v2 API, the old API will eventually be retired.
 Today, the two API styles coexist, and all the old APIs will continue to work without any change.
 
 NOTE: The v2 API is classified as "experimental".
 It may change in backwards-incompatible ways as it evolves to cover additional functionality.
 
-The old API and the v2 API differ in three principle ways:
+The old API and the v2 API differ in two principle ways:
 
 .  Command format: The old API commands and associated parameters are provided through URL request parameters on HTTP GET requests, while in the v2 API most API commands are provided via a JSON body POST'ed to v2 API endpoints.
 The v2 API also supports HTTP methods GET and DELETE where appropriate.
 .  Endpoint structure: The v2 API endpoint structure has been rationalized and regularized.
-.  Documentation: The v2 APIs are self-documenting: append `/_introspect` to any valid v2 API path and the API specification will be returned in JSON format.
 
 == v2 API Path Prefixes
 
@@ -49,101 +48,18 @@ Following are some v2 API URL paths and path prefixes, along with some of the op
 |`/api/cores` |Create a core.
 |`/api/cores/\{coreName}` |Reload, rename, delete, and unload a core.
 |`/api/node` |Perform overseer operation, rejoin leader election.
-|`/api/cluster` |List live nodes, manage node roles, set cluster property. `POST` sets the cluster rate limiter.
+|`/api/cluster/nodes` |List live nodes.
+|`/api/cluster/properties` |List, get, set, and delete cluster properties.
+|`/api/cluster` |`POST` sets the cluster rate limiter.
 |===
 
-== Introspect
-
-Append `/_introspect` to any valid v2 API path and the API specification will be returned in JSON format.
-
-`\http://localhost:8983/api/c/_introspect`
-
-To limit the introspect output to include just one particular HTTP method, add the request parameter `method` with value `GET`, `POST`, or `DELETE`.
-
-`\http://localhost:8983/api/c/_introspect?method=POST`
-
-Most endpoints support commands provided in a body sent via POST.
-To limit the introspect output to only one command, add the request parameter `command=_command-name_`.
-
-`\http://localhost:8983/api/c/gettingstarted/_introspect?method=POST&command=modify`
-
-=== Interpreting the Introspect Output
-
-Example: `\http://localhost:8983/api/c/gettingstarted/get/_introspect`
-
-[source,json]
-----
-{
-  "spec":[{
-      "documentation":"https://solr.apache.org/guide/solr/latest/configuration-guide/realtime-get.html",
-      "description":"RealTime Get allows retrieving documents by ID before the documents have been committed to the index. It is useful when you need access to documents as soon as they are indexed but your commit times are high for other reasons.",
-      "methods":["GET"],
-      "url":{
-        "paths":["/c/gettingstarted/get"],
-        "params":{
-          "id":{
-            "type":"string",
-            "description":"A single document ID to retrieve."},
-          "ids":{
-            "type":"string",
-            "description":"One or more document IDs to retrieve. Separate by commas if more than one ID is specified."},
-          "fq":{
-            "type":"string",
-            "description":"An optional filter query to add to the query. One use case for this is security filtering, in case users or groups should not be able to retrieve the document ID requested."}}}}],
-  "WARNING":"This response format is experimental.  It is likely to change in the future.",
-  "availableSubPaths":{}
-}
-----
-
-Description of some of the keys in the above example:
-
-* `**documentation**`: URL to the online Solr reference guide section for this API
-* `**description**`: A text description of the feature/variable/command, etc.
-* `**spec/methods**`: HTTP methods supported by this API
-* `**spec/url/paths**`: URL paths supported by this API
-* `**spec/url/params**`: List of supported URL request params
-* `**availableSubPaths**`: List of valid URL subpaths and the HTTP method(s) each supports
-
-Example of introspect for a POST API: `\http://localhost:8983/api/c/gettingstarted/_introspect?method=POST&command=modify`
-
-[source,json]
-----
-{
-  "spec":[{
-      "documentation":"https://solr.apache.org/guide/solr/latest/configuration-guide/collections-api.html",
-      "description":"Several collection-level operations are supported with this endpoint: modify collection attributes; reload a collection; migrate documents to a different collection; rebalance collection leaders; balance properties across shards; and add or delete a replica property.",
-      "methods":["POST"],
-      "url":{"paths":["/collections/{collection}",
-          "/c/{collection}"]},
-      "commands":{"modify":{
-          "documentation":"https://solr.apache.org/guide/solr/latest/deployment-guide/collection-management.html#modifycollection",
-          "description":"Modifies specific attributes of a collection. Multiple attributes can be changed at one time.",
-          "type":"object",
-          "properties":{
-            "replicationFactor":{
-              "type":"string",
-              "description":"The number of replicas to be created for each shard. Replicas are physical copies of each shard, acting as failover for the shard. Note that changing this value on an existing collection does not automatically add more replicas to the collection. However, it will allow add-replica commands to succeed."}}}}}],
-  "WARNING":"This response format is experimental.  It is likely to change in the future.",
-  "availableSubPaths":{
-    "/c/gettingstarted/select":["POST", "GET"],
-    "/c/gettingstarted/config":["POST", "GET"],
-    "/c/gettingstarted/schema":["POST", "GET"],
-    "/c/gettingstarted/export":["POST", "GET"],
-    "/c/gettingstarted/admin/ping":["POST", "GET"],
-    "/c/gettingstarted/update":["POST"]}
-}
-----
-
-The `"commands"` section in the above example has one entry for each command supported at this endpoint.
-The key is the command name and the value is a JSON object describing the command structure using JSON schema (see http://json-schema.org/ for a description).
-
 == Invocation Examples
 
-For the "gettingstarted" collection, set the replication factor and whether to automatically add replicas (see above for the introspect output for the `"modify"` command used here):
+For the "gettingstarted" collection, set the replication factor and whether to automatically add replicas:
 
 [source,bash]
 ----
-curl http://localhost:8983/api/c/gettingstarted -H 'Content-type:application/json' -d '
+curl 'http://localhost:8983/api/c/gettingstarted' -H 'Content-type:application/json' -d '
 { modify: { replicationFactor: "3" } }'
 
 {"responseHeader":{"status":0,"QTime":842}}
@@ -153,7 +69,7 @@ See the collections, shards, and replicas in the cluster:
 
 [source,bash]
 ----
-curl http://localhost:8983/api/collections?detailed=true
+curl 'http://localhost:8983/api/collections?detailed=true'
 
 {"responseHeader":{"status":0,"QTime":1},"collectionsDetail":{"gettingstarted":{"health":"GREEN","shards":{"shard1":{"state":"active"}}}}}
 ----
@@ -162,8 +78,8 @@ Set a cluster property:
 
 [source,bash]
 ----
-curl http://localhost:8983/api/cluster -H 'Content-type: application/json' -d '
-{ set-property: { name: maxCoresPerNode, val: "100" } }'
+curl -X PUT 'http://localhost:8983/api/cluster/properties/urlScheme' -H 'Content-type: application/json' -d '
+{ "value": "http" }'
 
 {"responseHeader":{"status":0,"QTime":4}}
 ----


(solr) 03/11: SOLR-18234: Moved packagemanager CLI stuff to a CLI package (#5018)

Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 744a12e308c4fbd31a8f2841a1e989598be94b4d
Author: Jalaz Kumar <ja...@gmail.com>
AuthorDate: Fri Oct 9 20:30:55 2026 +0530

    SOLR-18234: Moved packagemanager CLI stuff to a CLI package (#5018)
    
    and stop test-framework from depending on CLI.
    
    (cherry picked from commit 8e62c2686882aa704480ab13b6a60ee8f7b5c8af)
---
 .../SOLR-18234-solr-cli-detangle-core.yml          |  9 +++++++
 .../org/apache/solr/cli/PackageSubCommand.java     |  4 ++--
 .../src/java/org/apache/solr/cli/PackageTool.java  | 16 ++++++-------
 .../src/java/org/apache/solr/cli/ZkCpTool.java     |  2 +-
 .../src/java/org/apache/solr/cli/ZkMkrootTool.java |  2 +-
 .../src/java/org/apache/solr/cli/ZkMvTool.java     |  2 +-
 .../packagemanager/DefaultPackageRepository.java   |  2 +-
 .../{ => cli}/packagemanager/PackageManager.java   | 10 ++++----
 .../packagemanager/PackageRepository.java          |  2 +-
 .../{ => cli}/packagemanager/PackageUtils.java     |  4 ++--
 .../packagemanager/RepositoryManager.java          |  8 +++----
 .../solr/{ => cli}/packagemanager/SolrPackage.java |  2 +-
 .../packagemanager/SolrPackageInstance.java        |  6 ++---
 .../{ => cli}/packagemanager/package-info.java     |  2 +-
 .../solr/{cloud => cli}/SolrCloudExampleTest.java  | 11 ++-------
 .../packagemanager/TestPackageManager.java         |  2 +-
 .../solr/filestore/TestDistribFileStore.java       |  9 +++++--
 .../solr/security/BasicAuthIntegrationTest.java    | 13 +++++-----
 solr/test-framework/build.gradle                   |  4 +---
 solr/test-framework/gradle.lockfile                |  4 ++--
 .../solr/cloud/AbstractFullDistribZkTestBase.java  | 28 +++++++++-------------
 21 files changed, 71 insertions(+), 71 deletions(-)

diff --git a/changelog/unreleased/SOLR-18234-solr-cli-detangle-core.yml b/changelog/unreleased/SOLR-18234-solr-cli-detangle-core.yml
new file mode 100644
index 00000000000..276cf5861ff
--- /dev/null
+++ b/changelog/unreleased/SOLR-18234-solr-cli-detangle-core.yml
@@ -0,0 +1,9 @@
+title:
+  Move packagemanager under CLI and stop test-framework from depending on CLI
+type: other
+authors:
+  - name: Jalaz Kumar
+    nick: jaykay12
+links:
+  - name: SOLR-18234
+    url: https://issues.apache.org/jira/browse/SOLR-18234
diff --git a/solr/core/src/java/org/apache/solr/cli/PackageSubCommand.java b/solr/core/src/java/org/apache/solr/cli/PackageSubCommand.java
index 9b8130227af..0b4b35e7e07 100644
--- a/solr/core/src/java/org/apache/solr/cli/PackageSubCommand.java
+++ b/solr/core/src/java/org/apache/solr/cli/PackageSubCommand.java
@@ -18,8 +18,8 @@
 package org.apache.solr.cli;
 
 import org.apache.commons.cli.CommandLine;
-import org.apache.solr.packagemanager.PackageManager;
-import org.apache.solr.packagemanager.RepositoryManager;
+import org.apache.solr.cli.packagemanager.PackageManager;
+import org.apache.solr.cli.packagemanager.RepositoryManager;
 
 /** Shared picocli wiring for {@code bin/solr package <subcommand> leaves} */
 @SuppressWarnings("UnnecessarilyFullyQualified")
diff --git a/solr/core/src/java/org/apache/solr/cli/PackageTool.java b/solr/core/src/java/org/apache/solr/cli/PackageTool.java
index 5e7ebe39a9d..c1ef0a086d9 100644
--- a/solr/core/src/java/org/apache/solr/cli/PackageTool.java
+++ b/solr/core/src/java/org/apache/solr/cli/PackageTool.java
@@ -18,8 +18,8 @@ package org.apache.solr.cli;
 
 import static org.apache.solr.cli.SolrCLI.printGreen;
 import static org.apache.solr.cli.SolrCLI.printRed;
-import static org.apache.solr.packagemanager.PackageUtils.format;
-import static org.apache.solr.packagemanager.PackageUtils.formatGreen;
+import static org.apache.solr.cli.packagemanager.PackageUtils.format;
+import static org.apache.solr.cli.packagemanager.PackageUtils.formatGreen;
 
 import java.lang.invoke.MethodHandles;
 import java.nio.file.Files;
@@ -33,16 +33,16 @@ import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.core.LoggerContext;
 import org.apache.logging.log4j.core.config.Configurator;
 import org.apache.lucene.util.SuppressForbidden;
+import org.apache.solr.cli.packagemanager.PackageManager;
+import org.apache.solr.cli.packagemanager.PackageUtils;
+import org.apache.solr.cli.packagemanager.RepositoryManager;
+import org.apache.solr.cli.packagemanager.SolrPackage;
+import org.apache.solr.cli.packagemanager.SolrPackage.SolrPackageRelease;
+import org.apache.solr.cli.packagemanager.SolrPackageInstance;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.SolrException.ErrorCode;
 import org.apache.solr.common.util.Pair;
-import org.apache.solr.packagemanager.PackageManager;
-import org.apache.solr.packagemanager.PackageUtils;
-import org.apache.solr.packagemanager.RepositoryManager;
-import org.apache.solr.packagemanager.SolrPackage;
-import org.apache.solr.packagemanager.SolrPackage.SolrPackageRelease;
-import org.apache.solr.packagemanager.SolrPackageInstance;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/solr/core/src/java/org/apache/solr/cli/ZkCpTool.java b/solr/core/src/java/org/apache/solr/cli/ZkCpTool.java
index 7d8959f8eec..0798a168245 100644
--- a/solr/core/src/java/org/apache/solr/cli/ZkCpTool.java
+++ b/solr/core/src/java/org/apache/solr/cli/ZkCpTool.java
@@ -16,7 +16,7 @@
  */
 package org.apache.solr.cli;
 
-import static org.apache.solr.packagemanager.PackageUtils.format;
+import static org.apache.solr.cli.packagemanager.PackageUtils.format;
 
 import java.lang.invoke.MethodHandles;
 import java.lang.reflect.InvocationTargetException;
diff --git a/solr/core/src/java/org/apache/solr/cli/ZkMkrootTool.java b/solr/core/src/java/org/apache/solr/cli/ZkMkrootTool.java
index ee0225694fe..317bd7965b4 100644
--- a/solr/core/src/java/org/apache/solr/cli/ZkMkrootTool.java
+++ b/solr/core/src/java/org/apache/solr/cli/ZkMkrootTool.java
@@ -16,7 +16,7 @@
  */
 package org.apache.solr.cli;
 
-import static org.apache.solr.packagemanager.PackageUtils.format;
+import static org.apache.solr.cli.packagemanager.PackageUtils.format;
 
 import java.lang.invoke.MethodHandles;
 import java.util.concurrent.TimeUnit;
diff --git a/solr/core/src/java/org/apache/solr/cli/ZkMvTool.java b/solr/core/src/java/org/apache/solr/cli/ZkMvTool.java
index 8a0db12b037..08eea82044c 100644
--- a/solr/core/src/java/org/apache/solr/cli/ZkMvTool.java
+++ b/solr/core/src/java/org/apache/solr/cli/ZkMvTool.java
@@ -16,7 +16,7 @@
  */
 package org.apache.solr.cli;
 
-import static org.apache.solr.packagemanager.PackageUtils.format;
+import static org.apache.solr.cli.packagemanager.PackageUtils.format;
 
 import java.lang.invoke.MethodHandles;
 import java.util.Locale;
diff --git a/solr/core/src/java/org/apache/solr/packagemanager/DefaultPackageRepository.java b/solr/core/src/java/org/apache/solr/cli/packagemanager/DefaultPackageRepository.java
similarity index 98%
rename from solr/core/src/java/org/apache/solr/packagemanager/DefaultPackageRepository.java
rename to solr/core/src/java/org/apache/solr/cli/packagemanager/DefaultPackageRepository.java
index 8fbbfbbd347..2cf7416ae27 100644
--- a/solr/core/src/java/org/apache/solr/packagemanager/DefaultPackageRepository.java
+++ b/solr/core/src/java/org/apache/solr/cli/packagemanager/DefaultPackageRepository.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.solr.packagemanager;
+package org.apache.solr.cli.packagemanager;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.fasterxml.jackson.core.type.TypeReference;
diff --git a/solr/core/src/java/org/apache/solr/packagemanager/PackageManager.java b/solr/core/src/java/org/apache/solr/cli/packagemanager/PackageManager.java
similarity index 99%
rename from solr/core/src/java/org/apache/solr/packagemanager/PackageManager.java
rename to solr/core/src/java/org/apache/solr/cli/packagemanager/PackageManager.java
index e344f8ec35d..7db659bbca1 100644
--- a/solr/core/src/java/org/apache/solr/packagemanager/PackageManager.java
+++ b/solr/core/src/java/org/apache/solr/cli/packagemanager/PackageManager.java
@@ -15,9 +15,9 @@
  * limitations under the License.
  */
 
-package org.apache.solr.packagemanager;
+package org.apache.solr.cli.packagemanager;
 
-import static org.apache.solr.packagemanager.PackageUtils.getMapper;
+import static org.apache.solr.cli.packagemanager.PackageUtils.getMapper;
 
 import com.jayway.jsonpath.InvalidPathException;
 import com.jayway.jsonpath.JsonPath;
@@ -41,6 +41,9 @@ import java.util.stream.Collectors;
 import org.apache.solr.cli.CLIUtils;
 import org.apache.solr.cli.SolrCLI;
 import org.apache.solr.cli.ToolRuntime;
+import org.apache.solr.cli.packagemanager.SolrPackage.Command;
+import org.apache.solr.cli.packagemanager.SolrPackage.Manifest;
+import org.apache.solr.cli.packagemanager.SolrPackage.Plugin;
 import org.apache.solr.client.api.util.SolrVersion;
 import org.apache.solr.client.solrj.RemoteSolrException;
 import org.apache.solr.client.solrj.SolrClient;
@@ -64,9 +67,6 @@ import org.apache.solr.common.util.StrUtils;
 import org.apache.solr.common.util.Utils;
 import org.apache.solr.filestore.DistribFileStore;
 import org.apache.solr.handler.admin.ContainerPluginsApi;
-import org.apache.solr.packagemanager.SolrPackage.Command;
-import org.apache.solr.packagemanager.SolrPackage.Manifest;
-import org.apache.solr.packagemanager.SolrPackage.Plugin;
 import org.apache.solr.pkg.SolrPackageLoader;
 import org.apache.zookeeper.KeeperException;
 import org.slf4j.Logger;
diff --git a/solr/core/src/java/org/apache/solr/packagemanager/PackageRepository.java b/solr/core/src/java/org/apache/solr/cli/packagemanager/PackageRepository.java
similarity index 97%
rename from solr/core/src/java/org/apache/solr/packagemanager/PackageRepository.java
rename to solr/core/src/java/org/apache/solr/cli/packagemanager/PackageRepository.java
index e791a49e542..2586ee600d6 100644
--- a/solr/core/src/java/org/apache/solr/packagemanager/PackageRepository.java
+++ b/solr/core/src/java/org/apache/solr/cli/packagemanager/PackageRepository.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.solr.packagemanager;
+package org.apache.solr.cli.packagemanager;
 
 import java.io.IOException;
 import java.nio.file.Path;
diff --git a/solr/core/src/java/org/apache/solr/packagemanager/PackageUtils.java b/solr/core/src/java/org/apache/solr/cli/packagemanager/PackageUtils.java
similarity index 99%
rename from solr/core/src/java/org/apache/solr/packagemanager/PackageUtils.java
rename to solr/core/src/java/org/apache/solr/cli/packagemanager/PackageUtils.java
index c97bdab3123..35fdc24d97d 100644
--- a/solr/core/src/java/org/apache/solr/packagemanager/PackageUtils.java
+++ b/solr/core/src/java/org/apache/solr/cli/packagemanager/PackageUtils.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.solr.packagemanager;
+package org.apache.solr.cli.packagemanager;
 
 import static org.apache.solr.client.solrj.util.SolrIdentifierValidator.validateCollectionName;
 
@@ -35,6 +35,7 @@ import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 import org.apache.commons.io.IOUtils;
 import org.apache.solr.cli.CLIUtils;
+import org.apache.solr.cli.packagemanager.SolrPackage.Manifest;
 import org.apache.solr.client.api.model.UploadToFileStoreResponse;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrRequest;
@@ -50,7 +51,6 @@ import org.apache.solr.common.util.Utils;
 import org.apache.solr.filestore.ClusterFileStore;
 import org.apache.solr.filestore.DistribFileStore;
 import org.apache.solr.filestore.FileStoreAPI;
-import org.apache.solr.packagemanager.SolrPackage.Manifest;
 import org.apache.solr.util.SolrJacksonAnnotationInspector;
 import org.apache.zookeeper.server.ByteBufferInputStream;
 
diff --git a/solr/core/src/java/org/apache/solr/packagemanager/RepositoryManager.java b/solr/core/src/java/org/apache/solr/cli/packagemanager/RepositoryManager.java
similarity index 98%
rename from solr/core/src/java/org/apache/solr/packagemanager/RepositoryManager.java
rename to solr/core/src/java/org/apache/solr/cli/packagemanager/RepositoryManager.java
index 29a86c75e0a..64af782131f 100644
--- a/solr/core/src/java/org/apache/solr/packagemanager/RepositoryManager.java
+++ b/solr/core/src/java/org/apache/solr/cli/packagemanager/RepositoryManager.java
@@ -15,9 +15,9 @@
  * limitations under the License.
  */
 
-package org.apache.solr.packagemanager;
+package org.apache.solr.cli.packagemanager;
 
-import static org.apache.solr.packagemanager.PackageUtils.getMapper;
+import static org.apache.solr.cli.packagemanager.PackageUtils.getMapper;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -37,6 +37,8 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.stream.Collectors;
 import org.apache.solr.cli.ToolRuntime;
+import org.apache.solr.cli.packagemanager.SolrPackage.Artifact;
+import org.apache.solr.cli.packagemanager.SolrPackage.SolrPackageRelease;
 import org.apache.solr.client.api.util.SolrVersion;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrRequest;
@@ -53,8 +55,6 @@ import org.apache.solr.common.cloud.SolrZkClient;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.Utils;
 import org.apache.solr.filestore.ClusterFileStore;
-import org.apache.solr.packagemanager.SolrPackage.Artifact;
-import org.apache.solr.packagemanager.SolrPackage.SolrPackageRelease;
 import org.apache.solr.pkg.PackageAPI;
 import org.apache.solr.pkg.SolrPackageLoader;
 import org.apache.zookeeper.KeeperException;
diff --git a/solr/core/src/java/org/apache/solr/packagemanager/SolrPackage.java b/solr/core/src/java/org/apache/solr/cli/packagemanager/SolrPackage.java
similarity index 98%
rename from solr/core/src/java/org/apache/solr/packagemanager/SolrPackage.java
rename to solr/core/src/java/org/apache/solr/cli/packagemanager/SolrPackage.java
index 750a23d2162..f57c5713dd2 100644
--- a/solr/core/src/java/org/apache/solr/packagemanager/SolrPackage.java
+++ b/solr/core/src/java/org/apache/solr/cli/packagemanager/SolrPackage.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.solr.packagemanager;
+package org.apache.solr.cli.packagemanager;
 
 import java.util.Date;
 import java.util.List;
diff --git a/solr/core/src/java/org/apache/solr/packagemanager/SolrPackageInstance.java b/solr/core/src/java/org/apache/solr/cli/packagemanager/SolrPackageInstance.java
similarity index 93%
rename from solr/core/src/java/org/apache/solr/packagemanager/SolrPackageInstance.java
rename to solr/core/src/java/org/apache/solr/cli/packagemanager/SolrPackageInstance.java
index fd94bc8572f..040de2babc4 100644
--- a/solr/core/src/java/org/apache/solr/packagemanager/SolrPackageInstance.java
+++ b/solr/core/src/java/org/apache/solr/cli/packagemanager/SolrPackageInstance.java
@@ -15,16 +15,16 @@
  * limitations under the License.
  */
 
-package org.apache.solr.packagemanager;
+package org.apache.solr.cli.packagemanager;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import org.apache.solr.cli.packagemanager.SolrPackage.Manifest;
+import org.apache.solr.cli.packagemanager.SolrPackage.Plugin;
 import org.apache.solr.common.annotation.JsonProperty;
 import org.apache.solr.common.util.ReflectMapWriter;
-import org.apache.solr.packagemanager.SolrPackage.Manifest;
-import org.apache.solr.packagemanager.SolrPackage.Plugin;
 
 /** Describes one instance of a package as it exists in Solr when installed. */
 public class SolrPackageInstance implements ReflectMapWriter {
diff --git a/solr/core/src/java/org/apache/solr/packagemanager/package-info.java b/solr/core/src/java/org/apache/solr/cli/packagemanager/package-info.java
similarity index 95%
rename from solr/core/src/java/org/apache/solr/packagemanager/package-info.java
rename to solr/core/src/java/org/apache/solr/cli/packagemanager/package-info.java
index 1fa175dec4b..0a42a28f435 100644
--- a/solr/core/src/java/org/apache/solr/packagemanager/package-info.java
+++ b/solr/core/src/java/org/apache/solr/cli/packagemanager/package-info.java
@@ -16,4 +16,4 @@
  */
 
 /** This package contains Package Manager (CLI) implementation */
-package org.apache.solr.packagemanager;
+package org.apache.solr.cli.packagemanager;
diff --git a/solr/core/src/test/org/apache/solr/cloud/SolrCloudExampleTest.java b/solr/core/src/test/org/apache/solr/cli/SolrCloudExampleTest.java
similarity index 95%
rename from solr/core/src/test/org/apache/solr/cloud/SolrCloudExampleTest.java
rename to solr/core/src/test/org/apache/solr/cli/SolrCloudExampleTest.java
index c7a6e70ef29..a9b680c207f 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SolrCloudExampleTest.java
+++ b/solr/core/src/test/org/apache/solr/cli/SolrCloudExampleTest.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.solr.cloud;
+package org.apache.solr.cli;
 
 import java.lang.invoke.MethodHandles;
 import java.nio.file.Files;
@@ -23,16 +23,9 @@ import java.util.Set;
 import java.util.concurrent.TimeUnit;
 import org.apache.commons.cli.CommandLine;
 import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.cli.CLITestHelper;
-import org.apache.solr.cli.CLIUtils;
-import org.apache.solr.cli.CreateTool;
-import org.apache.solr.cli.DeleteTool;
-import org.apache.solr.cli.HealthcheckTool;
-import org.apache.solr.cli.PostTool;
-import org.apache.solr.cli.SolrCLI;
-import org.apache.solr.cli.ToolRuntime;
 import org.apache.solr.client.solrj.request.SolrQuery;
 import org.apache.solr.client.solrj.response.QueryResponse;
+import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
 import org.apache.solr.common.cloud.ZkStateReader;
 import org.apache.solr.util.ExternalPaths;
 import org.junit.Test;
diff --git a/solr/core/src/test/org/apache/solr/packagemanager/TestPackageManager.java b/solr/core/src/test/org/apache/solr/cli/packagemanager/TestPackageManager.java
similarity index 98%
rename from solr/core/src/test/org/apache/solr/packagemanager/TestPackageManager.java
rename to solr/core/src/test/org/apache/solr/cli/packagemanager/TestPackageManager.java
index 4d6bedf078a..2793af1641d 100644
--- a/solr/core/src/test/org/apache/solr/packagemanager/TestPackageManager.java
+++ b/solr/core/src/test/org/apache/solr/cli/packagemanager/TestPackageManager.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.solr.packagemanager;
+package org.apache.solr.cli.packagemanager;
 
 import com.jayway.jsonpath.InvalidPathException;
 import java.io.IOException;
diff --git a/solr/core/src/test/org/apache/solr/filestore/TestDistribFileStore.java b/solr/core/src/test/org/apache/solr/filestore/TestDistribFileStore.java
index 133116e6908..7a6affe1b9e 100644
--- a/solr/core/src/test/org/apache/solr/filestore/TestDistribFileStore.java
+++ b/solr/core/src/test/org/apache/solr/filestore/TestDistribFileStore.java
@@ -50,7 +50,6 @@ import org.apache.solr.common.util.StrUtils;
 import org.apache.solr.common.util.SuppressForbidden;
 import org.apache.solr.common.util.Utils;
 import org.apache.solr.embedded.JettySolrRunner;
-import org.apache.solr.packagemanager.PackageUtils;
 import org.apache.solr.util.LogLevel;
 import org.apache.zookeeper.server.ByteBufferInputStream;
 import org.junit.Before;
@@ -330,7 +329,13 @@ public class TestDistribFileStore extends SolrCloudTestCase {
   public static void uploadKey(byte[] bytes, String path, MiniSolrCloudCluster cluster)
       throws Exception {
     JettySolrRunner jetty = cluster.getRandomJetty(random());
-    PackageUtils.uploadKey(bytes, path, jetty.getCoreContainer().getSolrHome());
+
+    FileStoreAPI.MetaData metaData = ClusterFileStore._createJsonMetaData(bytes, null);
+    DistribFileStore._persistToFile(
+        jetty.getCoreContainer().getSolrHome(),
+        path,
+        ByteBuffer.wrap(bytes),
+        ByteBuffer.wrap(Utils.toJSON(metaData)));
 
     final var syncReq = new FileStoreApi.SyncFile(path);
     final var syncRsp = syncReq.process(jetty.getSolrClient());
diff --git a/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java b/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java
index 71c1da0c463..7ce0630de81 100644
--- a/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/security/BasicAuthIntegrationTest.java
@@ -25,16 +25,16 @@ import java.util.Map;
 import java.util.Random;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
-import org.apache.solr.cli.CLITestHelper;
-import org.apache.solr.cli.StatusTool;
 import org.apache.solr.client.solrj.RemoteSolrException;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrRequest;
 import org.apache.solr.client.solrj.SolrServerException;
+import org.apache.solr.client.solrj.jetty.HttpJettySolrClient;
 import org.apache.solr.client.solrj.request.CollectionAdminRequest;
 import org.apache.solr.client.solrj.request.GenericSolrRequest;
 import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.client.solrj.request.RequestWriter.StringPayloadContentWriter;
+import org.apache.solr.client.solrj.request.SystemInfoRequest;
 import org.apache.solr.client.solrj.request.UpdateRequest;
 import org.apache.solr.client.solrj.request.V2Request;
 import org.apache.solr.client.solrj.request.beans.PluginMeta;
@@ -283,10 +283,11 @@ public class BasicAuthIntegrationTest extends SolrCloudAuthTestCase {
     verifySecurityStatus(httpClient, baseUrl + "/admin/info/key", "key", NOT_NULL_PREDICATE, 20);
     assertAuthMetricsMinimums(17, 8, 8, 1, 0, 0);
 
-    String[] toolArgs = new String[] {"status", "--solr-url", baseUrl};
-    int res = CLITestHelper.runTool(toolArgs, StatusTool.class);
-    if (res == 0) {
-      fail("Request should have failed because of missing auth");
+    try (SolrClient unauthorizedClient = new HttpJettySolrClient.Builder(baseUrl).build()) {
+      RemoteSolrException statusExp =
+          expectThrows(
+              RemoteSolrException.class, () -> new SystemInfoRequest().process(unauthorizedClient));
+      assertEquals(401, statusExp.code());
     }
 
     SolrParams params = new MapSolrParams(Map.of("q", "*:*"));
diff --git a/solr/test-framework/build.gradle b/solr/test-framework/build.gradle
index aa4114f3c96..ff9e87339db 100644
--- a/solr/test-framework/build.gradle
+++ b/solr/test-framework/build.gradle
@@ -60,9 +60,7 @@ dependencies {
   implementation libs.slf4j.api
   implementation libs.apache.log4j.api
   implementation libs.apache.log4j.core
-  implementation libs.commonscli.commonscli
-  // Needed on the compile classpath because this project compiles against annotated org.apache.solr.cli types
-  implementation libs.picocli
+
   implementation libs.opentelemetry.api
   implementation(libs.opentelemetry.exporter.prometheus) {
     transitive = false // most things don't want or already have
diff --git a/solr/test-framework/gradle.lockfile b/solr/test-framework/gradle.lockfile
index ce8f078c593..042fde73ff6 100644
--- a/solr/test-framework/gradle.lockfile
+++ b/solr/test-framework/gradle.lockfile
@@ -32,10 +32,10 @@ com.google.protobuf:protobuf-java:4.36.2=annotationProcessor,errorprone,testAnno
 com.j256.simplemagic:simplemagic:1.17=jarValidation,runtimeClasspath,testRuntimeClasspath
 com.jayway.jsonpath:json-path:3.0.0=jarValidation,runtimeClasspath,testRuntimeClasspath
 com.tdunning:t-digest:3.3=jarValidation,runtimeClasspath,testRuntimeClasspath
-commons-cli:commons-cli:1.11.0=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
+commons-cli:commons-cli:1.11.0=jarValidation,runtimeClasspath,testRuntimeClasspath
 commons-codec:commons-codec:1.22.1=jarValidation,runtimeClasspath,testRuntimeClasspath
 commons-io:commons-io:2.22.0=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
-info.picocli:picocli:4.7.6=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
+info.picocli:picocli:4.7.6=jarValidation,runtimeClasspath,testRuntimeClasspath
 io.dropwizard.metrics:metrics-core:4.2.39=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
 io.github.eisop:dataflow-errorprone:3.41.0-eisop1=annotationProcessor,errorprone,testAnnotationProcessor
 io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,errorprone,testAnnotationProcessor
diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
index 0b8e194abc7..d774bb92efd 100644
--- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
+++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
@@ -49,10 +49,6 @@ import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.function.Consumer;
 import org.apache.solr.BaseDistributedSearchTestCase;
-import org.apache.solr.cli.ConfigSetUploadTool;
-import org.apache.solr.cli.DefaultToolRuntime;
-import org.apache.solr.cli.SolrCLI;
-import org.apache.solr.cli.ToolRuntime;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrRequest;
 import org.apache.solr.client.solrj.SolrRequest.METHOD;
@@ -100,6 +96,7 @@ import org.apache.solr.common.util.SolrNamedThreadFactory;
 import org.apache.solr.common.util.StrUtils;
 import org.apache.solr.common.util.TimeSource;
 import org.apache.solr.common.util.Utils;
+import org.apache.solr.core.ConfigSetService;
 import org.apache.solr.core.CoreContainer;
 import org.apache.solr.core.Diagnostics;
 import org.apache.solr.core.MockDirectoryFactory;
@@ -2224,19 +2221,16 @@ public abstract class AbstractFullDistribZkTestBase extends BaseDistributedSearc
       Path configSetDir, String srcConfigSet, String dstConfigName, String zkAddr)
       throws Exception {
 
-    Path fullConfDir = configSetDir.resolve(srcConfigSet);
-    String[] args =
-        new String[] {
-          "--conf-name", dstConfigName,
-          "--conf-dir", fullConfDir.toAbsolutePath().toString(),
-          "-z", zkAddr
-        };
-
-    ToolRuntime runtime = new DefaultToolRuntime();
-    ConfigSetUploadTool tool = new ConfigSetUploadTool(runtime);
-
-    int res = tool.runTool(SolrCLI.processCommandLineArgs(tool, args));
-    assertEquals("Tool should have returned 0 for success, returned: " + res, 0, res);
+    Path confPath =
+        ConfigSetService.getConfigsetPath(
+            configSetDir.resolve(srcConfigSet).toString(), configSetDir.toString());
+    try (SolrZkClient zkClient =
+        new SolrZkClient.Builder()
+            .withUrl(zkAddr)
+            .withTimeout(AbstractZkTestCase.TIMEOUT, TimeUnit.MILLISECONDS)
+            .build()) {
+      zkClient.upConfig(confPath, dstConfigName);
+    }
   }
 
   @Override


(solr) 04/11: SOLR-4841: DetectedLanguage constructor should be public (#5070)

Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 3fc8a23074845d128570541e0cd21ea71f2d8b89
Author: Nick <ni...@gmail.com>
AuthorDate: Sat Oct 10 04:46:37 2026 -0600

    SOLR-4841: DetectedLanguage constructor should be public (#5070)
    
    (cherry picked from commit a99ff066f405b11ce1fbb70ca2c23aba7eccda37)
---
 ...LR-4841-detectedlanguage-public-constructor.yml |  8 ++++
 .../solr/update/processor/DetectedLanguage.java    |  2 +-
 .../custom/CustomLanguageIdentifierTest.java       | 49 ++++++++++++++++++++++
 3 files changed, 58 insertions(+), 1 deletion(-)

diff --git a/changelog/unreleased/SOLR-4841-detectedlanguage-public-constructor.yml b/changelog/unreleased/SOLR-4841-detectedlanguage-public-constructor.yml
new file mode 100644
index 00000000000..fbd26467880
--- /dev/null
+++ b/changelog/unreleased/SOLR-4841-detectedlanguage-public-constructor.yml
@@ -0,0 +1,8 @@
+# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc
+title: The DetectedLanguage constructor in the langid module is now public, so custom LanguageIdentifierUpdateProcessor subclasses can return results.
+type: changed
+authors:
+  - name: Nick Shanin
+links:
+  - name: SOLR-4841
+    url: https://issues.apache.org/jira/browse/SOLR-4841
diff --git a/solr/modules/langid/src/java/org/apache/solr/update/processor/DetectedLanguage.java b/solr/modules/langid/src/java/org/apache/solr/update/processor/DetectedLanguage.java
index 07d4e7530df..0735f1a40d6 100644
--- a/solr/modules/langid/src/java/org/apache/solr/update/processor/DetectedLanguage.java
+++ b/solr/modules/langid/src/java/org/apache/solr/update/processor/DetectedLanguage.java
@@ -21,7 +21,7 @@ public class DetectedLanguage {
   private final String langCode;
   private final Double certainty;
 
-  DetectedLanguage(String lang, Double certainty) {
+  public DetectedLanguage(String lang, Double certainty) {
     this.langCode = lang;
     this.certainty = certainty;
   }
diff --git a/solr/modules/langid/src/test/org/apache/solr/update/processor/custom/CustomLanguageIdentifierTest.java b/solr/modules/langid/src/test/org/apache/solr/update/processor/custom/CustomLanguageIdentifierTest.java
new file mode 100644
index 00000000000..ce9a81d5d5e
--- /dev/null
+++ b/solr/modules/langid/src/test/org/apache/solr/update/processor/custom/CustomLanguageIdentifierTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.update.processor.custom;
+
+import java.io.Reader;
+import java.util.List;
+import org.apache.solr.SolrTestCase;
+import org.apache.solr.request.SolrQueryRequest;
+import org.apache.solr.response.SolrQueryResponse;
+import org.apache.solr.update.processor.DetectedLanguage;
+import org.apache.solr.update.processor.LanguageIdentifierUpdateProcessor;
+import org.apache.solr.update.processor.UpdateRequestProcessor;
+
+/** A language identifier living outside the processor package can build its own results. */
+public class CustomLanguageIdentifierTest extends SolrTestCase {
+
+  /** Minimal custom implementation; compiling it is the main check. */
+  static class FixedLanguageIdentifier extends LanguageIdentifierUpdateProcessor {
+    FixedLanguageIdentifier(
+        SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) {
+      super(req, rsp, next);
+    }
+
+    @Override
+    protected List<DetectedLanguage> detectLanguage(Reader solrDocReader) {
+      return List.of(new DetectedLanguage("sv", 0.75));
+    }
+  }
+
+  public void testDetectedLanguageCanBeCreatedOutsidePackage() {
+    DetectedLanguage lang = new DetectedLanguage("en", 0.9);
+    assertEquals("en", lang.getLangCode());
+    assertEquals(0.9, lang.getCertainty(), 0.0);
+  }
+}