text
stringlengths
0
834k
:usage
IF NOT ""%SCRIPT_ERROR%""=="""" ECHO %SCRIPT_ERROR%
IF [%FIRST_ARG%]==[] goto script_usage
IF ""%FIRST_ARG%""==""-help"" goto script_usage
IF ""%FIRST_ARG%""==""-usage"" goto script_usage
IF ""%FIRST_ARG%""==""-h"" goto script_usage
IF ""%FIRST_ARG%""==""--help"" goto script_usage
IF ""%FIRST_ARG%""==""/?"" goto script_usage
IF ""%SCRIPT_CMD%""==""start"" goto start_usage
IF ""%SCRIPT_CMD%""==""restart"" goto start_usage
IF ""%SCRIPT_CMD%""==""stop"" goto stop_usage
IF ""%SCRIPT_CMD%""==""healthcheck"" goto healthcheck_usage
IF ""%SCRIPT_CMD%""==""create"" goto create_usage
IF ""%SCRIPT_CMD%""==""create_core"" goto create_core_usage
IF ""%SCRIPT_CMD%""==""create_collection"" goto create_collection_usage
IF ""%SCRIPT_CMD%""==""delete"" goto delete_usage
IF ""%SCRIPT_CMD%""==""zk"" goto zk_usage
IF ""%SCRIPT_CMD%""==""auth"" goto auth_usage
IF ""%SCRIPT_CMD%""==""status"" goto status_usage
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, assert, config, export
@echo.
@echo Standalone server example (start Solr running in the background on port 8984):
@echo.
@echo solr start -p 8984
@echo.
@echo SolrCloud example (start Solr running in SolrCloud mode using localhost:2181 to connect to Zookeeper, with 1g max heap size and remote Java debug options enabled):
@echo.
@echo solr start -c -m 1g -z localhost:2181 -a ""-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044""
@echo.
@echo Omit '-z localhost:2181' from the above command if you have defined ZK_HOST in solr.in.cmd.
@echo.
@echo Pass -help after any COMMAND to see command-specific usage information,
@echo such as: solr start -help or solr stop -help
@echo.
goto done
:start_usage
@echo.
@echo Usage: solr %SCRIPT_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.
@echo -c or -cloud Start Solr in SolrCloud mode; if -z not supplied and ZK_HOST not defined in
@echo solr.in.cmd, 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.
@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.
@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.cmd nor the -z parameter is specified,
@echo an embedded ZooKeeper instance will be launched.
@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.
@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 a relative dir
@echo validation with the current dir will be done before trying the 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 both 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
@echo.
@echo -a opts 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 opts 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.
@echo -v and -q Verbose (-v) or quiet (-q) logging. Sets default log level to DEBUG or WARN instead of INFO
@echo.
@echo -V/-verbose Verbose messages from this script