Frequently Asked Questions - SearchStax

The SearchStax® Frequently Asked Questions page includes the following approved question and answer about our Apache Solr Cloud services.

What else can I do with the zkcli script?

The SearchStax Quick Start exercise demonstrates how to use the zkcli utility script to set up a simple SearchStax project. Users have often asked us what else zkcli can do.

zkcli Help

If you run the zkcli script using the "help" keyword, it displays a lengthy list of options and examples. For example, in Windows: "$ zkcli.bat help". Linux: "./zkcli.sh help".

To save you some trouble, the full help message is shown here:
C:\searchstax-client-master\solr-6\scripts>zkcli.bat help
usage: ZkCLI
 -c,--collection      for linkconfig: name of the collection
 -cmd                      cmd to run: bootstrap, upconfig, downconfig,
                           linkconfig, makepath, put, putfile,get,getfile,
                           list, clear, updateacls
 -d,--confdir         for upconfig: a directory of configuration
                           files
 -h,--help                 bring up this help page
 -n,--confname        for upconfig, linkconfig: name of the config
                           set
 -name                name of the cluster property to set
 -r,--runzk           run zk internally by passing the solr run port
                           - only for clusters on one machine (tests, dev)
 -s,--solrhome        for bootstrap, runzk: solrhome location
 -val                 value of the cluster to set
 -x,--excluderegex    for upconfig: files matching this regular
                           expression won't be uploaded
 -z,--zkhost          ZooKeeper host address
Examples:
zkcli.sh -zkhost localhost:9983 -cmd bootstrap -solrhome /opt/solr
zkcli.sh -zkhost localhost:9983 -cmd upconfig -confdir /opt/solr/collection1/conf -confname myconf
zkcli.sh -zkhost localhost:9983 -cmd downconfig -confdir /opt/solr/collection1/conf -confname myconf
zkcli.sh -zkhost localhost:9983 -cmd linkconfig -collection collection1 -confname myconf
zkcli.sh -zkhost localhost:9983 -cmd makepath /apache/solr
zkcli.sh -zkhost localhost:9983 -cmd put /solr.conf 'conf data'
zkcli.sh -zkhost localhost:9983 -cmd putfile /solr.xml /User/myuser/solr/solr.xml
zkcli.sh -zkhost localhost:9983 -cmd get /solr.xml
zkcli.sh -zkhost localhost:9983 -cmd getfile /solr.xml solr.xml.file
zkcli.sh -zkhost localhost:9983 -cmd clear /solr
zkcli.sh -zkhost localhost:9983 -cmd list
zkcli.sh -zkhost localhost:9983 -cmd clusterprop -name urlScheme -val https
zkcli.sh -zkhost localhost:9983 -cmd updateacls /solr

We love to answer questions!

Please contact the SearchStax Support Desk immediately if you have any question about Solr Cloud deployments.

Return to Frequently Asked Questions.