11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

./server/scripts/cloud-scripts/zkcli.sh -zkhost 127.0.0.1:9983 \<br />

-cmd put /my_zk_file.txt 'some data'<br />

Put a local file into a new ZooKeeper file<br />

./server/scripts/cloud-scripts/zkcli.sh -zkhost 127.0.0.1:9983 \<br />

-cmd putfile /my_zk_file.txt /tmp/my_local_file.txt<br />

Link a collection to a configuration set<br />

./server/scripts/cloud-scripts/zkcli.sh -zkhost 127.0.0.1:9983 \<br />

-cmd linkconfig -collection gettingstarted -confname my_new_config<br />

Create a new ZooKeeper path<br />

./server/scripts/cloud-scripts/zkcli.sh -zkhost 127.0.0.1:2181 \<br />

-cmd makepath /solr<br />

This can be useful to create a chroot path in ZooKeeper before first cluster start.<br />

Set a cluster property<br />

This command will add or modify a single cluster property in /clusterprops.json. Use this command instead<br />

of the usual getfile -> edit -> putfile cycle. Unlike the CLUSTERPROP REST API, this command does not require<br />

a running <strong>Solr</strong> cluster.<br />

./server/scripts/cloud-scripts/zkcli.sh -zkhost 127.0.0.1:2181 \<br />

-cmd clusterprop -name urlScheme -val https<br />

<strong>Solr</strong>Cloud with Legacy Configuration Files<br />

All of the required configuration is already set up in the sample configurations shipped with <strong>Solr</strong>. You only need<br />

to add the following if you are migrating old configuration files. Do not remove these files and parameters from a<br />

new <strong>Solr</strong> instance if you intend to use <strong>Solr</strong> in <strong>Solr</strong>Cloud mode.<br />

These properties exist in 3 files: schema.xml, solrconfig.xml, and solr.xml.<br />

1. In schema.xml , you must have a _version_ field defined:<br />

<br />

2. In , you must have an defined. This should be defined in the<br />

solrconfig.xml UpdateLog updateHandler<br />

section.<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

602

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!