Apache Lucene open-source search software
SOLR-11131: Document 'assert' as a command option in bin/solr, and bin/solr.cmd scripts
Anshum Gupta88218824004d
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex c6c4050da19..fb5d946ee6a 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -109,6 +109,9 @@ Other Changes* SOLR-10916: Convert tests that extend LuceneTestCase and use MiniSolrCloudClusterto instead extend SolrCloudTestCase. (Steve Rowe)+* SOLR-11131: Document 'assert' as a command option in bin/solr, and bin/solr.cmd scripts.+ (Jason Gerlowski via Anshum Gupta)+================== 7.0.0 ==================Versions of Major Componentsdiff --git a/solr/bin/solr b/solr/bin/solrindex 8e7c8d8a8e2..821bbf3cbb1 100755--- a/solr/bin/solr+++ b/solr/bin/solr@@ -295,7 +295,7 @@ function print_usage() {if [ -z "$CMD" ]; thenecho ""echo "Usage: solr COMMAND OPTIONS"- echo " where COMMAND is one of: start, stop, restart, status, healthcheck, create, create_core, create_collection, delete, version, zk, auth"+ echo " where COMMAND is one of: start, stop, restart, status, healthcheck, create, create_core, create_collection, delete, version, zk, auth, assert"echo ""echo " Standalone server example (start Solr running in the background on port 8984):"echo ""diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmdindex cfc21b97e58..9a2ca9b45f0 100644--- a/solr/bin/solr.cmd+++ b/solr/bin/solr.cmd@@ -268,7 +268,7 @@ goto done:script_usage@echo.@echo Usage: solr COMMAND OPTIONS-@echo where COMMAND is one of: start, stop, restart, healthcheck, create, create_core, create_collection, delete, version, zk, auth+@echo where COMMAND is one of: start, stop, restart, healthcheck, create, create_core, create_collection, delete, version, zk, auth, assert@echo.@echo Standalone server example (start Solr running in the background on port 8984):@echo.diff --git a/solr/solr-ref-guide/src/solr-control-script-reference.adoc b/solr/solr-ref-guide/src/solr-control-script-reference.adocindex 368aacc2422..588867145ee 100644--- a/solr/solr-ref-guide/src/solr-control-script-reference.adoc+++ b/solr/solr-ref-guide/src/solr-control-script-reference.adoc@@ -296,6 +296,23 @@ Solr process 39827 running on port 8865"collections":"2"}}----+=== Assert++The `assert` command sanity-checks common issues with Solr installations. These include checking the ownership/existence of particular directories, and ensuring Solr is available on the expected URL. The command can either output a specified error message, or change its exit code to indicate errors.++As an example:++`bin/solr assert --exists /opt/bin/solr`++Results in the output below:++[source,plain]+----++ERROR: Directory /opt/bin/solr does not exist.++----+=== HealthcheckThe `healthcheck` command generates a JSON-formatted health report for a collection when running in SolrCloud mode. The health report provides information about the state of every replica for all shards in a collection, including the number of committed documents and its current state.