11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

are pulled from server/solr/configsets/ so you can review them beforehand if you wish. The data_drive<br />

n_schema_configs configuration (the default) is useful when you're still designing a schema for your documents<br />

and need some flexiblity as you experiment with <strong>Solr</strong>.<br />

At this point, you should have a new collection created in your local <strong>Solr</strong>Cloud cluster. To verify this, you can run<br />

the status command:<br />

$ bin/solr status<br />

If you encounter any errors during this process, check the <strong>Solr</strong> log files in example/cloud/node1/logs and e<br />

xample/cloud/node2/logs.<br />

You can see how your collection is deployed across the cluster by visiting the cloud panel in the <strong>Solr</strong> Admin UI: h<br />

ttp://localhost:8983/solr/#/~cloud. <strong>Solr</strong> also provides a way to perform basic diagnostics for a collection using the<br />

healthcheck command:<br />

$ bin/solr healthcheck -c gettingstarted<br />

The healthcheck command gathers basic information about each replica in a collection, such as number of docs,<br />

current status (active, down, etc), and address (where the replica lives in the cluster).<br />

Documents can now be added to <strong>Solr</strong>Cloud using the Post Tool.<br />

To stop <strong>Solr</strong> in <strong>Solr</strong>Cloud mode, you would use the bin/solr script and issue the stop command, as in:<br />

$ bin/solr stop -all<br />

Starting with -noprompt<br />

You can also get <strong>Solr</strong>Cloud started with all the defaults instead of the interactive session using the following<br />

command:<br />

$ bin/solr -e cloud -noprompt<br />

Restarting Nodes<br />

You can restart your <strong>Solr</strong>Cloud nodes using the bin/solr script. For instance, to restart node1 running on port<br />

8983 (with an embedded ZooKeeper server), you would do:<br />

$ bin/solr restart -c -p 8983 -s example/cloud/node1/solr<br />

To restart node2 running on port 7574, you can do:<br />

$ bin/solr restart -c -p 7574 -z localhost:9983 -s example/cloud/node2/solr<br />

Notice that you need to specify the ZooKeeper address (-z localhost:9983) when starting node2 so that it can join<br />

the cluster with node1.<br />

Adding a node to a cluster<br />

Adding a node to an existing cluster is a bit advanced and involves a little more understanding of <strong>Solr</strong>. Once you<br />

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

546

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

Saved successfully!

Ooh no, something went wrong!