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.

enabled. The following settings can be used to override the defaults in the section of solr.xml.<br />

Param Default Description<br />

autoReplicaFailoverWorkLoopDelay 10000 The time (in ms) between clusterstate inspections by the<br />

Overseer to detect and possibly act on creation of a<br />

replacement replica.<br />

autoReplicaFailoverWaitAfterExpiration 30000 The minimum time (in ms) to wait for initiating replacement<br />

of a replica after first noticing it not being live. This is<br />

important to prevent false positives while stoping or<br />

starting the cluster.<br />

autoReplicaFailoverBadNodeExpiration 60000 The delay (in ms) after which a replica marked as down<br />

would be unmarked.<br />

Temporarily disable autoAddReplicas for the entire cluster<br />

When doing offline maintenance on the cluster and for various other use cases where an admin would like to<br />

temporarily disable auto addition of replicas, the following APIs will disable and re-enable autoAddReplicas for all<br />

collections in the cluster:<br />

Disable auto addition of replicas cluster wide by setting the cluster property autoAddReplicas to false:<br />

http://localhost:8983/solr/admin/collections?action=CLUSTERPROP&name=autoAddReplicas<br />

&val=false<br />

Re-enable auto addition of replicas (for those collections created with autoAddReplica=true) by unsetting the aut<br />

oAddReplicas cluster property (when no val param is provided, the cluster property is unset):<br />

http://localhost:8983/solr/admin/collections?action=CLUSTERPROP&name=autoAddReplicas<br />

Making and Restoring Backups of <strong>Solr</strong>Cores<br />

If you are worried about data loss, and of course you should be, you need a way to back up your <strong>Solr</strong> indexes so<br />

that you can recover quickly in case of catastrophic failure.<br />

Backups and restoration uses <strong>Solr</strong>'s replication handler. Out of the box, <strong>Solr</strong> includes implicit support for<br />

replication so this API can be used. Configuration of the replication handler can, however, be customized by<br />

defining your own replication handler in solrconfig.xml. For details on configuring the replication handler,<br />

see the section Configuring the ReplicationHandler.<br />

Backup API<br />

The backup API requires sending a command to the /replication handler to back up the system.<br />

You can trigger a back-up with an HTTP command like this (replace "gettingstarted" with the name of the core<br />

you are working with):<br />

Backup API<br />

curl http://localhost:8983/solr/gettingstarted/replication?command=backup<br />

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

536

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

Saved successfully!

Ooh no, something went wrong!