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

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


The following commit(s) were added to refs/heads/branch_9x by this push:
     new c7522c8ef16 SOLR-16766: Remove -usage as option, and ensure both -help 
and -h work (#1637)
c7522c8ef16 is described below

commit c7522c8ef1673428474d14181ced2cad47ce161a
Author: bszabo97 <[email protected]>
AuthorDate: Wed May 10 20:16:38 2023 +0200

    SOLR-16766: Remove -usage as option, and ensure both -help and -h work 
(#1637)
    
    Co-authored-by: Eric Pugh <[email protected]>
    (cherry picked from commit 3d8a2bd9cb5cafae427b80afb0547b4ce9a30d4a)
---
 solr/CHANGES.txt                                   |  10 +
 solr/bin/solr                                      | 262 +++++++++++----------
 .../core/src/java/org/apache/solr/cli/SolrCLI.java |   2 +-
 .../pages/solr-control-script-reference.adoc       |  91 ++++---
 4 files changed, 218 insertions(+), 147 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 4b826c1b381..55324ec114c 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -84,6 +84,16 @@ Improvements
 
 * SOLR-16782: bin/solr export tool now supports JSON export format as well as 
the existing JSON With Lines format. (Eric Pugh)
 
+* SOLR-16392: The v2 deletereplica API has been tweaked to be more intuitive: 
single replicas deletion now uses
+  `DELETE /api/collections/cName/shards/sName/replicas/rName`, deletion of 
multiple relicas in a single shard uses
+  `DELETE /api/collections/cName/shards/sName/replicas?count=123`, and 
deletion of multiple replicas from all shards now uses
+  `PUT /api/collections/cName/scale {"count": 123"}` (Jason Gerlowski)
+
+* SOLR-14853: Security: Converted enableRemoteStreaming and enableStreamBody 
solrconfig options into system properties and env vars.
+  Attempts to set them the old way are no-op and log a warning. (David Smiley, 
janhoy, Ishan Chattopadhyaya)
+
+* SOLR-16766: Remove -usage as option from bin/solr, and ensure both -help and 
-h work. (Bence Szabo via Eric Pugh)
+
 Optimizations
 ---------------------
 
diff --git a/solr/bin/solr b/solr/bin/solr
index dd5b175ce1d..deb34211d83 100644
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -354,69 +354,72 @@ function print_usage() {
     echo ""
     echo "  Omit '-z localhost:2181' from the above command if you have 
defined ZK_HOST in solr.in.sh."
     echo ""
-    echo "Pass -help after any COMMAND to see command-specific usage 
information,"
-    echo "  such as:    ./solr start -help or ./solr stop -help"
+    echo "Pass -help or -h after any COMMAND to see command-specific usage 
information,"
+    echo "  such as:    ./solr start -help or ./solr stop -h"
     echo ""
   elif [[ "$CMD" == "start" || "$CMD" == "restart" ]]; then
     echo ""
     echo "Usage: solr $CMD [-f] [-c] [-h hostname] [-p port] [-d directory] 
[-z zkHost] [-m memory] [-e example] [-s solr.solr.home] [-t solr.data.home] 
[-a \"additional-options\"] [-V]"
     echo ""
-    echo "  -f            Start Solr in foreground; default starts Solr in the 
background"
-    echo "                  and sends stdout / stderr to solr-PORT-console.log"
+    echo "  -f                    Start Solr in foreground; default starts 
Solr in the background"
+    echo "                          and sends stdout / stderr to 
solr-PORT-console.log"
     echo ""
-    echo "  -c or -cloud  Start Solr in SolrCloud mode; if -z not supplied and 
ZK_HOST not defined in"
-    echo "                  solr.in.sh, an embedded ZooKeeper instance is 
started on Solr port+1000,"
-    echo "                  such as 9983 if Solr is bound to 8983"
+    echo "  -c or -cloud          Start Solr in SolrCloud mode; if -z not 
supplied and ZK_HOST not defined in"
+    echo "                          solr.in.sh, an embedded ZooKeeper instance 
is started on Solr port+1000,"
+    echo "                          such as 9983 if Solr is bound to 8983"
     echo ""
-    echo "  -h <host>     Specify the hostname for this Solr instance"
+    echo "  -h/-host <host>       Specify the hostname for this Solr instance"
     echo ""
-    echo "  -p <port>     Specify the port to start the Solr HTTP listener on; 
default is 8983"
-    echo "                  The specified port (SOLR_PORT) will also be used 
to determine the stop port"
-    echo "                  STOP_PORT=(\$SOLR_PORT-1000) and JMX RMI listen 
port RMI_PORT=(\$SOLR_PORT+10000). "
-    echo "                  For instance, if you set -p 8985, then the 
STOP_PORT=7985 and RMI_PORT=18985"
+    echo "  -p <port>             Specify the port to start the Solr HTTP 
listener on; default is 8983"
+    echo "                          The specified port (SOLR_PORT) will also 
be used to determine the stop port"
+    echo "                          STOP_PORT=(\$SOLR_PORT-1000) and JMX RMI 
listen port RMI_PORT=(\$SOLR_PORT+10000). "
+    echo "                          For instance, if you set -p 8985, then the 
STOP_PORT=7985 and RMI_PORT=18985"
     echo ""
-    echo "  -d <dir>      Specify the Solr server directory; defaults to 
server"
+    echo "  -d <dir>              Specify the Solr server directory; defaults 
to server"
     echo ""
-    echo "  -z <zkHost>   Zookeeper connection string; only used when running 
in SolrCloud mode using -c"
-    echo "                   If neither ZK_HOST is defined in solr.in.sh nor 
the -z parameter is specified,"
-    echo "                   an embedded ZooKeeper instance will be launched."
-    echo "                   Set the ZK_CREATE_CHROOT environment variable to 
true if your ZK host has a chroot path, and you want to create it 
automatically."
+    echo "  -z/-zkHost <zkHost>   Zookeeper connection string; only used when 
running in SolrCloud mode using -c"
+    echo "                          If neither ZK_HOST is defined in 
solr.in.sh nor the -z parameter is specified,"
+    echo "                          an embedded ZooKeeper instance will be 
launched."
+    echo "                          Set the ZK_CREATE_CHROOT environment 
variable to true if your ZK host has a chroot path, and you want to create it 
automatically."
     echo ""
-    echo "  -m <memory>   Sets the min (-Xms) and max (-Xmx) heap size for the 
JVM, such as: -m 4g"
-    echo "                  results in: -Xms4g -Xmx4g; by default, this script 
sets the heap size to 512m"
+    echo "  -m <memory>           Sets the min (-Xms) and max (-Xmx) heap size 
for the JVM, such as: -m 4g"
+    echo "                          results in: -Xms4g -Xmx4g; by default, 
this script sets the heap size to 512m"
     echo ""
-    echo "  -s <dir>      Sets the solr.solr.home system property; Solr will 
create core directories under"
-    echo "                  this directory. This allows you to run multiple 
Solr instances on the same host"
-    echo "                  while reusing the same server directory set using 
the -d parameter. If set, the"
-    echo "                  specified directory should contain a solr.xml 
file, unless solr.xml exists in Zookeeper."
-    echo "                  This parameter is ignored when running examples 
(-e), as the solr.solr.home depends"
-    echo "                  on which example is run. The default value is 
server/solr. If passed relative dir,"
-    echo "                  validation with current dir will be done, before 
trying default server/<dir>"
+    echo "  -s <dir>              Sets the solr.solr.home system property; 
Solr will create core directories under"
+    echo "                          this directory. This allows you to run 
multiple Solr instances on the same host"
+    echo "                          while reusing the same server directory 
set using the -d parameter. If set, the"
+    echo "                          specified directory should contain a 
solr.xml file, unless solr.xml exists in Zookeeper."
+    echo "                          This parameter is ignored when running 
examples (-e), as the solr.solr.home depends"
+    echo "                          on which example is run. The default value 
is server/solr. If passed relative dir,"
+    echo "                          validation with current dir will be done, 
before trying default server/<dir>"
     echo ""
-    echo "  -t <dir>      Sets the solr.data.home system property, where Solr 
will store index data in <instance_dir>/data subdirectories."
-    echo "                  If not set, Solr uses solr.solr.home for config 
and data."
+    echo "  -t <dir>              Sets the solr.data.home system property, 
where Solr will store index data in <instance_dir>/data subdirectories."
+    echo "                          If not set, Solr uses solr.solr.home for 
config and data."
     echo ""
-    echo "  -e <example>  Name of the example to run; available examples:"
-    echo "      cloud:         SolrCloud example"
-    echo "      techproducts:  Comprehensive example illustrating many of 
Solr's core capabilities"
-    echo "      schemaless:    Schema-less example (schema is inferred from 
data during indexing)"
-    echo "      films:         Example of starting with _default configset and 
adding explicit fields dynamically"
+    echo "  -e <example>          Name of the example to run; available 
examples:"
+    echo "      cloud:              SolrCloud example"
+    echo "      techproducts:       Comprehensive example illustrating many of 
Solr's core capabilities"
+    echo "      schemaless:         Schema-less example (schema is inferred 
from data during indexing)"
+    echo "      films:              Example of starting with _default 
configset and adding explicit fields dynamically"
     echo ""
-    echo "  -a            Additional parameters to pass to the JVM when 
starting Solr, such as to setup"
-    echo "                  Java debug options. For example, to enable a Java 
debugger to attach to the Solr JVM"
-    echo "                  you could pass: -a 
\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=18983\""
-    echo "                  In most cases, you should wrap the additional 
parameters in double quotes."
+    echo "  -a <jvmParams>        Additional parameters to pass to the JVM 
when starting Solr, such as to setup"
+    echo "                          Java debug options. For example, to enable 
a Java debugger to attach to the Solr JVM"
+    echo "                          you could pass: -a 
\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=18983\""
+    echo "                          In most cases, you should wrap the 
additional parameters in double quotes."
     echo ""
-    echo "  -j            Additional parameters to pass to Jetty when starting 
Solr."
-    echo "                  For example, to add configuration folder that 
jetty should read"
-    echo "                  you could pass: -j 
\"--include-jetty-dir=/etc/jetty/custom/server/\""
-    echo "                  In most cases, you should wrap the additional 
parameters in double quotes."
+    echo "  -j <jettyParams>      Additional parameters to pass to Jetty when 
starting Solr."
+    echo "                          For example, to add configuration folder 
that jetty should read"
+    echo "                          you could pass: -j 
\"--include-jetty-dir=/etc/jetty/custom/server/\""
+    echo "                          In most cases, you should wrap the 
additional parameters in double quotes."
     echo ""
-    echo "  -noprompt     Don't prompt for input; accept all defaults when 
running examples that accept user input"
+    echo "  -noprompt             Don't prompt for input; accept all defaults 
when running examples that accept user input"
     echo ""
-    echo "  -v and -q     Verbose (-v) or quiet (-q) logging. Sets default log 
level to DEBUG or WARN instead of INFO"
+    echo "  -force                If attempting to start Solr as the root 
user, the script will exit with a warning that running Solr as "root" can cause 
problems."
+    echo "                          It is possible to override this warning 
with the `-force` parameter."
     echo ""
-    echo "  -V/-verbose   Verbose messages from this script"
+    echo "  -v and -q             Verbose (-v) or quiet (-q) logging. Sets 
default log level of Solr to DEBUG or WARN instead of INFO"
+    echo ""
+    echo "  -V/-verbose           Verbose messages from this script"
     echo ""
   elif [ "$CMD" == "stop" ]; then
     echo ""
@@ -438,12 +441,12 @@ function print_usage() {
     echo ""
     echo "Can be run from remote (non-Solr) hosts, as long as a proper 
ZooKeeper connection is provided"
     echo ""
-    echo "  -c <collection>  Collection to run healthcheck against."
+    echo "  -c <collection>         Collection to run healthcheck against."
     echo ""
-    echo "  -z <zkHost>      Zookeeper connection string; unnecessary if 
ZK_HOST is defined in solr.in.sh;"
-    echo "                     otherwise, default is localhost:9983"
+    echo "  -z or -zkHost <zkHost>  Zookeeper connection string; unnecessary 
if ZK_HOST is defined in solr.in.sh;"
+    echo "                            otherwise, default is localhost:9983"
     echo ""
-    echo "  -V               Enable more verbose output"
+    echo "  -V/-verbose             Enable more verbose output for this 
script."
     echo ""
   elif [ "$CMD" == "status" ]; then
     echo ""
@@ -481,11 +484,11 @@ function print_usage() {
     echo ""
     echo "  -deleteConfig <boolean> Delete the configuration directory from 
Zookeeper; default is true"
     echo ""
-    echo "  -p <port>               Port of a local Solr instance where you 
want to delete the core/collection"
+    echo "  -p or -port <port>      Port of a local Solr instance where you 
want to delete the core/collection"
     echo "                            If not specified, the script will search 
the local system for a running"
     echo "                            Solr instance and will use the port of 
the first server it finds."
     echo ""
-    echo "  -V                      Enables more verbose output."
+    echo "  -V/-verbose             Enable more verbose output for this 
script."
     echo ""
   elif [ "$CMD" == "create_core" ]; then
     echo ""
@@ -494,9 +497,9 @@ function print_usage() {
     echo "When a configSet is used, this can be run from remote (non-Solr) 
hosts.  If pointing at a non-configSet directory, this"
     echo "must be run from the host that you wish to create the core on"
     echo ""
-    echo "  -c <core>     Name of core to create"
+    echo "  -c <core>           Name of core to create"
     echo ""
-    echo "  -d <confdir>  Configuration directory to copy when creating the 
new core, built-in options are:"
+    echo "  -d <confdir>        Configuration directory to copy when creating 
the new core, built-in options are:"
     echo ""
     echo "      _default: Minimal configuration, which supports 
enabling/disabling field-guessing support"
     echo "      sample_techproducts_configs: Example configuration with many 
optional features enabled to"
@@ -507,73 +510,80 @@ function print_usage() {
     echo "      Alternatively, you can pass the path to your own configuration 
directory instead of using"
     echo "      one of the built-in configurations, such as: bin/solr 
create_core -c mycore -d /tmp/myconfig"
     echo ""
-    echo "  -p <port>     Port of a local Solr instance where you want to 
create the new core"
-    echo "                  If not specified, the script will search the local 
system for a running"
-    echo "                  Solr instance and will use the port of the first 
server it finds."
+    echo "  -p or -port <port>  Port of a local Solr instance where you want 
to create the new core"
+    echo "                        If not specified, the script will search the 
local system for a running"
+    echo "                        Solr instance and will use the port of the 
first server it finds."
+    echo ""
+    echo "  -force              If attempting to start Solr as the root user, 
the script will exit with a warning that running Solr as "root" can cause 
problems."
+    echo "                        It is possible to override this warning with 
the `-force` parameter."
     echo ""
-    echo "  -V            Enable more verbose output."
+    echo "  -V/-verbose   Enable more verbose output for this script"
     echo ""
   elif [ "$CMD" == "create_collection" ]; then
     echo ""
     echo "Usage: solr create_collection [-c collection] [-d confdir] [-n 
configName] [-shards #] [-replicationFactor #] [-p port] [-V]"
     echo ""
     echo "Can be run from remote (non-Solr) hosts, as long as a valid 
SOLR_HOST is provided in solr.in.sh"
-    echo "  -c <collection>         Name of collection to create"
+    echo "  -c <collection>               Name of collection to create"
     echo ""
-    echo "  -d <confdir>            Configuration directory to copy when 
creating the new collection, built-in options are:"
+    echo "  -d <confdir>                  Configuration directory to copy when 
creating the new collection, built-in options are:"
     echo ""
-    echo "      _default: Minimal configuration, which supports 
enabling/disabling field-guessing support"
-    echo "      sample_techproducts_configs: Example configuration with many 
optional features enabled to"
-    echo "         demonstrate the full power of Solr"
+    echo "        _default: Minimal configuration, which supports 
enabling/disabling field-guessing support"
+    echo "          sample_techproducts_configs: Example configuration with 
many optional features enabled to"
+    echo "          demonstrate the full power of Solr"
     echo ""
-    echo "      If not specified, default is: _default"
+    echo "        If not specified, default is: _default"
     echo ""
-    echo "      Alternatively, you can pass the path to your own configuration 
directory instead of using"
-    echo "      one of the built-in configurations, such as: bin/solr 
create_collection -c mycoll -d /tmp/myconfig"
+    echo "        Alternatively, you can pass the path to your own 
configuration directory instead of using"
+    echo "        one of the built-in configurations, such as: bin/solr 
create_collection -c mycoll -d /tmp/myconfig"
     echo ""
-    echo "      By default the script will upload the specified confdir 
directory into Zookeeper using the same"
-    echo "      name as the collection (-c) option. Alternatively, if you want 
to reuse an existing directory"
-    echo "      or create a confdir in Zookeeper that can be shared by 
multiple collections, use the -n option"
+    echo "        By default the script will upload the specified confdir 
directory into Zookeeper using the same"
+    echo "        name as the collection (-c) option. Alternatively, if you 
want to reuse an existing directory"
+    echo "        or create a confdir in Zookeeper that can be shared by 
multiple collections, use the -n option"
     echo ""
-    echo "  -n <configName>         Name the configuration directory in 
Zookeeper; by default, the configuration"
-    echo "                            will be uploaded to Zookeeper using the 
collection name (-c), but if you want"
-    echo "                            to use an existing directory or override 
the name of the configuration in"
-    echo "                            Zookeeper, then use the -c option."
+    echo "  -n <configName>                 Name the configuration directory 
in Zookeeper; by default, the configuration"
+    echo "                                    will be uploaded to Zookeeper 
using the collection name (-c), but if you want"
+    echo "                                    to use an existing directory or 
override the name of the configuration in"
+    echo "                                    Zookeeper, then use the -c 
option."
     echo ""
-    echo "  -shards <#>             Number of shards to split the collection 
into; default is 1"
+    echo "  -shards <#>                     Number of shards to split the 
collection into; default is 1"
     echo ""
-    echo "  -replicationFactor <#>  Number of copies of each document in the 
collection, default is 1 (no replication)"
+    echo "  -replicationFactor or -rf <#>   Number of copies of each document 
in the collection, default is 1 (no replication)"
     echo ""
-    echo "  -p <port>               Port of a local Solr instance where you 
want to create the new collection"
-    echo "                            If not specified, the script will search 
the local system for a running"
-    echo "                            Solr instance and will use the port of 
the first server it finds."
+    echo "  -p or -port <port>              Port of a local Solr instance 
where you want to create the new collection"
+    echo "                                    If not specified, the script 
will search the local system for a running"
+    echo "                                    Solr instance and will use the 
port of the first server it finds."
+    echo ""
+    echo "  -force                          If attempting to start Solr as the 
root user, the script will exit with a warning that running Solr as "root" can 
cause problems."
+    echo "                                    It is possible to override this 
warning with the `-force` parameter."
     echo ""
-    echo "  -V                      Enable more verbose output."
+    echo "  -V/-verbose                     Enable more verbose output for 
this script."
     echo ""
   elif [ "$CMD" == "zk" ]; then
     print_short_zk_usage ""
     echo "         Can be run on remote (non-Solr) hosts, as long as valid 
ZK_HOST information is provided"
     echo "         Be sure to check the Solr logs in case of errors."
     echo ""
-    echo "             -z zkHost  Optional Zookeeper connection string for all 
commands. If specified it"
-    echo "                        overrides the 'ZK_HOST=...'' defined in 
solr.in.sh."
+    echo "             -z zkHost          Optional Zookeeper connection string 
for all commands. If specified it"
+    echo "                                  overrides the 'ZK_HOST=...'' 
defined in solr.in.sh."
     echo ""
-    echo "             -V        Enable more verbose output."
+    echo "             -V/-verbose        Enable more verbose output for this 
script."
     echo ""
     echo "         upconfig uploads a configset from the local machine to 
Zookeeper. (Backcompat: -upconfig)"
     echo ""
     echo "         downconfig downloads a configset from Zookeeper to the 
local machine. (Backcompat: -downconfig)"
     echo ""
-    echo "             -n configName    Name of the configset in Zookeeper 
that will be the destination of"
-    echo "                             'upconfig' and the source for 
'downconfig'."
+    echo "             -n <configName>    Name of the configset in Zookeeper 
that will be the destination of"
+    echo "                                  'upconfig' and the source for 
'downconfig'."
     echo ""
-    echo "             -d confdir      The local directory the configuration 
will be uploaded from for"
-    echo "                             'upconfig' or downloaded to for 
'downconfig'. If 'confdir' is a child of"
-    echo "                             ...solr/server/solr/configsets' then 
the configs will be copied from/to"
-    echo "                             that directory. Otherwise it is 
interpreted as a simple local path."
+    echo "             -d <confdir>       The local directory the 
configuration will be uploaded from for"
+    echo "                                  'upconfig' or downloaded to for 
'downconfig'. If 'confdir' is a child of"
+    echo "                                  ...solr/server/solr/configsets' 
then the configs will be copied from/to"
+    echo "                                  that directory. Otherwise it is 
interpreted as a simple local path."
     echo ""
     echo "         cp copies files or folders to/from Zookeeper or Zookeeper 
-> Zookeeper"
-    echo "             -r    Recursively copy <src> to <dst>. Command will 
fail if <src> has children and "
+    echo ""
+    echo "             -r       Recursively copy <src> to <dst>. Command will 
fail if <src> has children and "
     echo "                        -r is not specified. Optional"
     echo ""
     echo "             <src>, <dest> : [file:][/]path/to/local/file or 
zk:/path/to/zk/node"
@@ -603,11 +613,13 @@ function print_usage() {
     echo "             Wildcards are supported when copying from local, 
trailing only and must be quoted."
     echo ""
     echo "         rm deletes files or folders on Zookeeper"
-    echo "             -r     Recursively delete if <path> is a directory. 
Command will fail if <path>"
-    echo "                    has children and -r is not specified. Optional"
+    echo ""
+    echo "             -r       Recursively delete if <path> is a directory. 
Command will fail if <path>"
+    echo "                        has children and -r is not specified. 
Optional"
     echo "             <path> : [zk:]/path/to/zk/node. <path> may not be the 
root ('/')"
     echo ""
     echo "         mv moves (renames) znodes on Zookeeper"
+    echo ""
     echo "             <src>, <dest> : Zookeeper nodes, the 'zk:' prefix is 
optional."
     echo "             If <dest> ends with '/', then <dest> will be a parent 
znode"
     echo "             and the last element of the <src> path will be 
appended."
@@ -616,16 +628,17 @@ function print_usage() {
     echo "             is important."
     echo ""
     echo "         ls lists the znodes on Zookeeper"
-    echo "             -r recursively descends the path listing all znodes. 
Optional"
-    echo "             <path>: The Zookeeper path to use as the root."
+    echo ""
+    echo "             -r       Recursively descends the path listing all 
znodes. Optional"
+    echo "             <path>:  The Zookeeper path to use as the root."
     echo ""
     echo "             Only the node names are listed, not data"
     echo ""
     echo "         mkroot makes a znode in Zookeeper with no data. Can be used 
to make a path of arbitrary"
     echo "             depth but primarily intended to create a 'chroot'."
     echo ""
-    echo "             <path>: The Zookeeper path to create. Leading slash is 
assumed if not present."
-    echo "                     Intermediate nodes are created as needed if not 
present."
+    echo "             <path>:  The Zookeeper path to create. Leading slash is 
assumed if not present."
+    echo "                        Intermediate nodes are created as needed if 
not present."
     echo ""
   elif [ "$CMD" == "auth" ]; then
     echo ""
@@ -636,32 +649,43 @@ function print_usage() {
     echo ""
     echo "  Updates or enables/disables authentication.  Must be run on the 
machine hosting Solr."
     echo ""
-    echo "  -type <type>                           The authentication 
mechanism (basicAuth or kerberos) to enable. Defaults to 'basicAuth'."
+    echo "  -type or -t <type>                     The authentication 
mechanism (basicAuth or kerberos) to enable. Defaults to 'basicAuth'."
     echo ""
     echo "  -credentials <user:pass>               The username and password 
of the initial user. Applicable for basicAuth only."
-    echo "                                         Note: only one of -prompt 
or -credentials must be provided"
+    echo "                                          Note: only one of -prompt 
or -credentials must be provided"
+    echo ""
+    echo "  -config \"<configs>\"                  Configuration parameters 
(Solr startup parameters). Required and applicable only for Kerberos"
     echo ""
-    echo "  -config \"<configs>\"                    Configuration parameters 
(Solr startup parameters). Required and applicable only for Kerberos"
+    echo "  -solrIncludeFile <includeFilePath>     Specify the full path to 
the include file in the environment."
+    echo "                                          If not specified this 
script looks for an include file named solr.in.sh to set environment variables. 
"
+    echo "                                          Specifically,the following 
locations are searched in this order:"
+    echo "                                              <script location>/."
+    echo "                                              $HOME/.solr.in.sh"
+    echo "                                              /usr/share/solr"
+    echo "                                              /usr/local/share/solr"
+    echo "                                              /etc/default"
+    echo "                                              /var/solr"
+    echo "                                              /opt/solr"
     echo ""
     echo "  -prompt <true|false>                   Prompts the user to provide 
the credentials. Applicable for basicAuth only."
-    echo "                                         Note: only one of -prompt 
or -credentials must be provided"
+    echo "                                          Note: only one of -prompt 
or -credentials must be provided"
     echo ""
     echo "  -blockUnknown <true|false>             When true, this blocks out 
access to unauthenticated users. When not provided,"
-    echo "                                         this defaults to false 
(i.e. unauthenticated users can access all endpoints, except the"
-    echo "                                         operations like 
collection-edit, security-edit, core-admin-edit etc.). Check the reference"
-    echo "                                         guide for Basic 
Authentication for more details. Applicable for basicAuth only."
+    echo "                                          this defaults to false 
(i.e. unauthenticated users can access all endpoints, except the"
+    echo "                                          operations like 
collection-edit, security-edit, core-admin-edit etc.). Check the reference"
+    echo "                                          guide for Basic 
Authentication for more details. Applicable for basicAuth only."
     echo ""
     echo "  -updateIncludeFileOnly <true|false>    Only update the solr.in.sh 
or solr.in.cmd file, and skip actual enabling/disabling"
-    echo "                                         authentication (i.e. don't 
update security.json)"
+    echo "                                          authentication (i.e. don't 
update security.json)"
     echo ""
-    echo "  -z zkHost                              Zookeeper connection 
string. Unnecessary if ZK_HOST is defined in solr.in.sh."
+    echo "  -z or -zkHost <zkHost>                 Zookeeper connection 
string. Unnecessary if ZK_HOST is defined in solr.in.sh."
     echo ""
-    echo "  -d <dir>                               Specify the Solr server 
directory"
+    echo "  -d or -dir <dir>                       Specify the Solr server 
directory"
     echo ""
-    echo "  -s <dir>                               Specify the Solr home 
directory. This is where any credentials or authentication"
-    echo "                                         configuration files (e.g. 
basicAuth.conf) would be placed."
+    echo "  -s or -solr.home <dir>                 Specify the Solr home 
directory. This is where any credentials or authentication"
+    echo "                                          configuration files (e.g. 
basicAuth.conf) would be placed."
     echo ""
-    echo "  -V                                     Enable more verbose output."
+    echo "  -V/-verbose                            Enable more verbose output 
for this script."
     echo ""
   elif [ "$CMD" == "package" ]; then
     echo ""
@@ -913,7 +937,7 @@ function stop_solr() {
 
 if [ $# -eq 1 ]; then
   case $1 in
-    -help|-usage|-h|--help)
+    -help|-h)
         print_usage ""
         exit
     ;;
@@ -996,11 +1020,11 @@ if [ "$SCRIPT_CMD" == "healthcheck" ]; then
               ZK_HOST="$2"
               shift 2
           ;;
-          -help|-usage)
+          -help|-h)
               print_usage "$SCRIPT_CMD"
               exit 0
           ;;
-          -V|--verbose)
+          -V|-verbose)
               VERBOSE="-verbose"
               shift
           ;;
@@ -1137,7 +1161,7 @@ if [[ "$SCRIPT_CMD" == "create" || "$SCRIPT_CMD" == 
"create_core" || "$SCRIPT_CM
               CREATE_PORT="$2"
               shift 2
           ;;
-          -V|--verbose)
+          -V|-verbose)
               VERBOSE="-verbose"
               shift
           ;;
@@ -1145,7 +1169,7 @@ if [[ "$SCRIPT_CMD" == "create" || "$SCRIPT_CMD" == 
"create_core" || "$SCRIPT_CM
               FORCE=true
               shift
           ;;
-          -help|-usage)
+          -help|-h)
               print_usage "$SCRIPT_CMD"
               exit 0
           ;;
@@ -1253,11 +1277,11 @@ if [[ "$SCRIPT_CMD" == "delete" ]]; then
               DELETE_CONFIG="$2"
               shift 2
           ;;
-          -V|--verbose)
+          -V|-verbose)
               VERBOSE="-verbose"
               shift
           ;;
-          -help|-usage)
+          -help|-h)
               print_usage "$SCRIPT_CMD"
               exit 0
           ;;
@@ -1352,11 +1376,11 @@ if [[ "$SCRIPT_CMD" == "zk" ]]; then
             ZK_RECURSE="true"
             shift
         ;;
-        -V|--verbose)
+        -V|-verbose)
             VERBOSE="-verbose"
             shift
         ;;
-        -help|-usage|-h)
+        -help|-h)
             print_usage "$SCRIPT_CMD"
             exit 0
         ;;
@@ -1534,7 +1558,7 @@ if [[ "$SCRIPT_CMD" == "auth" ]]; then
             AUTH_PARAMS=("${AUTH_PARAMS[@]}" "-updateIncludeFileOnly" "$2")
             shift 2
         ;;
-        -V|--verbose)
+        -V|-verbose)
             VERBOSE="-verbose"
             shift
         ;;
@@ -1567,7 +1591,7 @@ if [[ "$SCRIPT_CMD" == "auth" ]]; then
             SOLR_HOME="$2"
             shift 2
         ;;
-        -help|-usage|-h)
+        -help|-h)
             print_usage "$SCRIPT_CMD"
             exit 0
         ;;
@@ -1783,7 +1807,7 @@ if [ $# -gt 0 ]; then
             STOP_KEY="$2"
             shift 2
         ;;
-        -help|-usage)
+        -help|-h)
             print_usage "$SCRIPT_CMD"
             exit 0
         ;;
@@ -1793,7 +1817,7 @@ if [ $# -gt 0 ]; then
         ;;
         -V|-verbose)
             verbose=true
-            PASS_TO_RUN_EXAMPLE+=("--verbose")
+            PASS_TO_RUN_EXAMPLE+=("-verbose")
             shift
         ;;
         -v)
diff --git a/solr/core/src/java/org/apache/solr/cli/SolrCLI.java 
b/solr/core/src/java/org/apache/solr/cli/SolrCLI.java
index bd4d5e20bc2..af95a0711f7 100755
--- a/solr/core/src/java/org/apache/solr/cli/SolrCLI.java
+++ b/solr/core/src/java/org/apache/solr/cli/SolrCLI.java
@@ -325,7 +325,7 @@ public class SolrCLI implements CLIO {
       boolean hasHelpArg = false;
       if (args != null) {
         for (String arg : args) {
-          if ("--help".equals(arg) || "-help".equals(arg)) {
+          if ("-h".equals(arg) || "-help".equals(arg)) {
             hasHelpArg = true;
             break;
           }
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 9d92011663f..fb674805f04 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
@@ -129,7 +129,7 @@ You cannot use this option when running examples with the 
`-e` option.
 +
 *Example*: `bin/solr start -f`
 
-`-h <hostname>`::
+`-host <hostname>` or `-h <hostname>`::
 +
 [%autowidth,frame=none]
 |===
@@ -202,7 +202,7 @@ This parameter is ignored when running examples (`-e`), as 
the `solr.solr.home`
 |===
 +
 Be more verbose.
-This changes the logging level of Log4j from `INFO` to `DEBUG`, having the 
same effect as if you edited `log4j2.xml`.
+This changes the logging level of Log4j in Solr from `INFO` to `DEBUG`, having 
the same effect as if you edited `log4j2.xml`.
 +
 *Example*: `bin/solr start -f -v`
 
@@ -214,12 +214,12 @@ This changes the logging level of Log4j from `INFO` to 
`DEBUG`, having the same
 |===
 +
 Be more quiet.
-This changes the logging level of Log4j from `INFO` to `WARN`, having the same 
effect as if you edited `log4j2.xml`.
+This changes the logging level of Log4j in Solr from `INFO` to `WARN`, having 
the same effect as if you edited `log4j2.xml`.
 This can be useful in a production setting where you want to limit logging to 
warnings and errors.
 +
 *Example*: `bin/solr start -f -q`
 
-`-V`::
+`-V` or `-verbose`::
 +
 [%autowidth,frame=none]
 |===
@@ -230,7 +230,7 @@ Start Solr with verbose messages from the start script.
 +
 *Example*: `bin/solr start -V`
 
-`-z <zkHost>`::
+`-z <zkHost>` or `-zkHost <zkHost>`::
 +
 [%autowidth,frame=none]
 |===
@@ -386,6 +386,16 @@ Stop key used to protect from stopping Solr inadvertently; 
default is "solrrocks
 +
 *Example*: `bin/solr stop -k solrrocks`
 
+`-V` or `-verbose`::
++
+[%autowidth,frame=none]
+|===
+|Optional |Default: none
+|===
++
+Stop Solr with verbose messages from the stop script.
++
+*Example*: `bin/solr stop -V`
 
 == System Information
 
@@ -478,7 +488,7 @@ s|Required |Default: none
 +
 *Example*: `bin/solr healthcheck -c gettingstarted`
 
-`-z <zkhost>`::
+`-z <zkhost>` or `-zkHost <zkhost>`::
 +
 [%autowidth,frame=none]
 |===
@@ -596,7 +606,7 @@ This defaults to the same name as the core or collection.
 +
 *Example*: `bin/solr create -n basic`
 
-`-p <port>`::
+`-p <port>` or `-port <port>`::
 +
 [%autowidth,frame=none]
 |===
@@ -610,7 +620,7 @@ This option is useful if you are running multiple Solr 
instances on the same hos
 +
 *Example*: `bin/solr create -p 8983`
 
-`-s <shards>` or `-shards`::
+`-s <shards>` or `-shards <shards>`::
 +
 [%autowidth,frame=none]
 |===
@@ -622,7 +632,7 @@ Only applies when Solr is running in SolrCloud mode.
 +
 *Example*: `bin/solr create -s 2`
 
-`-rf <replicas>` or `-replicationFactor`::
+`-rf <replicas>` or `-replicationFactor <replicas>`::
 +
 [%autowidth,frame=none]
 |===
@@ -728,7 +738,7 @@ If the configuration directory is being used by another 
collection, then it will
 +
 *Example*: `bin/solr delete -deleteConfig false`
 
-`-p <port>`::
+`-p <port>` or `-port <port>`::
 +
 [%autowidth,frame=none]
 |===
@@ -791,7 +801,7 @@ 
SOLR_AUTHENTICATION_OPTS="-Dsolr.httpclient.config=/path/to/solr-{solr-full-vers
 
 The command takes the following parameters:
 
-`-credentials`::
+`-credentials <user:pass>`::
 +
 [%autowidth,frame=none]
 |===
@@ -803,7 +813,7 @@ The username and password in the format of 
`username:password` of the initial us
 If you prefer not to pass the username and password as an argument to the 
script, you can choose the `-prompt` option.
 Either `-credentials` or `-prompt` *must* be specified.
 
-`-prompt`::
+`-prompt <true|false>`::
 +
 [%autowidth,frame=none]
 |===
@@ -814,7 +824,7 @@ If prompt is preferred, pass `true` as a parameter to 
request the script to prom
 +
 Either `-credentials` or `-prompt` *must* be specified.
 
-`-blockUnknown`::
+`-blockUnknown <true|false>`::
 +
 [%autowidth,frame=none]
 |===
@@ -824,7 +834,24 @@ Either `-credentials` or `-prompt` *must* be specified.
 When `true`, blocks all unauthenticated users from accessing Solr.
 When `false`, unauthenticated users will still be able to access Solr, but 
only for operations not explicitly requiring a user role in the Authorization 
plugin configuration.
 
-`-updateIncludeFileOnly`::
+`-solrIncludeFile <includeFilePath>`::
++
+[%autowidth,frame=none]
+|===
+|Optional |Default: none
+|===
++
+Specify the full path to the include file in the environment.
+If not specified this script looks for an include file named solr.in.sh to set 
environment variables. Specifically, the following locations are searched in 
this order:
+    <script location>/.
+    $HOME/.solr.in.sh
+    /usr/share/solr
+    /usr/local/share/solr
+    /etc/default
+    /var/solr
+    /opt/solr
+
+`-updateIncludeFileOnly <true|false>`::
 +
 [%autowidth,frame=none]
 |===
@@ -833,7 +860,7 @@ When `false`, unauthenticated users will still be able to 
access Solr, but only
 +
 When `true`, only the settings in `bin/solr.in.sh` or `bin\solr.in.cmd` will 
be updated, and `security.json` will not be created.
 
-`-z`::
+`-z <zkHost>` or `-zkHost <zkHost>`::
 +
 [%autowidth,frame=none]
 |===
@@ -844,7 +871,7 @@ Defines the ZooKeeper connect string.
 This is useful if you want to enable authentication before all your Solr nodes 
have come up.
 Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.
 
-`-d`::
+`-d <dir>`::
 +
 [%autowidth,frame=none]
 |===
@@ -854,7 +881,7 @@ Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or 
`solr.in.cmd`.
 Defines the Solr server directory, by default `$SOLR_TIP/server`.
 It is not common to need to override the default, and is only needed if you 
have customized the `$SOLR_HOME` directory path.
 
-`-s`::
+`-s <dir>` or `-solr.home <dir>`::
 +
 [%autowidth,frame=none]
 |===
@@ -907,7 +934,7 @@ To unset a previously set user-defined property, specify 
`-action unset-user-pro
 
 === Config Parameters
 
-`-c <name>`::
+`-c <name>` or `-collection <name>`::
 +
 [%autowidth,frame=none]
 |===
@@ -943,7 +970,7 @@ Name of the property to change.
 +
 Set the property to this value.
 
-`-z <zkHost>`::
+`-z <zkHost>` or `-zkHost <zkHost>`::
 +
 [%autowidth,frame=none]
 |===
@@ -953,7 +980,7 @@ Set the property to this value.
 The ZooKeeper connection string, usable in SolrCloud mode.
 Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.
 
-`-p <port>`::
+`-p <port>` or `-port <port>`::
 +
 [%autowidth,frame=none]
 |===
@@ -971,6 +998,16 @@ Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or 
`solr.in.cmd`.
 +
 Base Solr URL, which can be used in SolrCloud mode to determine the ZooKeeper 
connection string if that's not known.
 
+`-s <scheme>` or `-scheme <scheme>`::
++
+[%autowidth,frame=none]
+|===
+|Optional |Default: `http`
+|===
++
+The scheme for accessing Solr. Accepted values: http or https.  Default is 
'http'
+
+
 == ZooKeeper Operations
 
 The `bin/solr` script allows certain operations affecting ZooKeeper.
@@ -1394,7 +1431,7 @@ NOTE: The `export` command only works with in a Solr 
running in cloud mode.
 
 The `bin/solr export` command takes the following parameters:
 
-`-url`::
+`-url <url>`::
 +
 [%autowidth,frame=none]
 |===
@@ -1405,7 +1442,7 @@ Fully-qualified address to a collection.
 +
 *Example*: `-url http://localhost:8983/solr/techproducts`
 
-`-format`::
+`-format <format>`::
 +
 [%autowidth,frame=none]
 |===
@@ -1416,7 +1453,7 @@ The file format of the export, `json`, `jsonl`, or 
`javabin`.
 Choosing `javabin` exports in the native Solr format, and is compact and fast 
to import.
 `jsonl` is the Json with Lines format, learn more at https://jsonlines.org/.
 
-`-out`::
+`-out <path>`::
 +
 [%autowidth,frame=none]
 |===
@@ -1436,7 +1473,7 @@ If not provided, a file will be created with the name of 
the collection, as in `
 +
 If you specify `-compress` then the resulting outputting file with will be 
gzipped, for example `<collection>.json.gz`.
 
-`-query`::
+`-query <query string>`::
 +
 [%autowidth,frame=none]
 |===
@@ -1446,7 +1483,7 @@ If you specify `-compress` then the resulting outputting 
file with will be gzipp
 A custom query.
 The default is `\*:*` which will export all documents.
 
-`-fields`::
+`-fields <fields>`::
 +
 [%autowidth,frame=none]
 |===
@@ -1456,7 +1493,7 @@ The default is `\*:*` which will export all documents.
 A comma separated list of fields to be exported.
 If not provided, all fields will be included.
 
-`-limit`::
+`-limit <number of documents>`::
 +
 [%autowidth,frame=none]
 |===
@@ -1530,7 +1567,7 @@ The `api` command will allow you to send an arbitrary 
HTTP request to a Solr API
 
 The `bin/solr api` command takes the following parameters:
 
-`-get`::
+`-get <url>`::
 +
 [%autowidth,frame=none]
 |===


Reply via email to