text
stringlengths
0
834k
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.
echo -V Enable more verbose output.
echo.
goto done
:create_collection_usage
echo.
echo Usage: solr create_collection [-c collection] [-d confdir] [-n confname] [-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.cmd.
echo.
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.
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.
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 c:/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.
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.
echo -replicationFactor # 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.
echo -V Enable more verbose output.
echo.
goto done
:zk_usage
set ZK_FULL=true
goto zk_short_usage
:zk_full_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.cmd.
echo.
echo -V Enable more verbose output.
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.
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 -r is not specified. Optional
echo.
echo. ^<src^>, ^<dest^> : [file:][/]path/to/local/file or zk:/path/to/zk/node
echo NOTE: ^<src^> and ^<dest^> may both be Zookeeper resources prefixed by 'zk:'
echo When ^<src^> is a zk resource, ^<dest^> may be '.'
echo If ^<dest^> ends with '/', then ^<dest^> will be a local folder or parent znode and the last
echo element of the ^<src^> path will be appended unless ^<src^> also ends in a slash.
echo ^<dest^> may be zk:, which may be useful when using the cp -r form to backup/restore
echo the entire zk state.
echo You must enclose local paths that end in a wildcard in quotes or just
echo end the local path in a slash. That is,
echo 'bin/solr zk cp -r /some/dir/ zk:/ -z localhost:2181' is equivalent to
echo 'bin/solr zk cp -r ^""/some/dir/*^"" zk:/ -z localhost:2181'
echo but 'bin/solr zk cp -r /some/dir/* zk:/ -z localhost:2181' will throw an error.
echo.
echo Here's an example of backup/restore for a ZK configuration:
echo to copy to local: 'bin/solr zk cp -r zk:/ /some/dir -z localhost:2181'
echo to restore to ZK: 'bin/solr zk cp -r /some/dir/ zk:/ -z localhost:2181'
echo.
echo The 'file:' prefix is stripped, thus 'file:/wherever' specifies an absolute local path and
echo 'file:somewhere' specifies a relative local path. All paths on Zookeeper are absolute.
echo.
echo Zookeeper nodes CAN have data, so moving a single file to a parent znode
echo will overlay the data on the parent Znode so specifying the trailing slash
echo can be important.