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.

Collection creation<br />

Shard creation<br />

Replica creation<br />

Shard splitting<br />

Common Use Cases<br />

There are several situations where this functionality may be used. A few of the rules that could be implemented<br />

are listed below:<br />

Don’t assign more than 1 replica of this collection to a host.<br />

Assign all replicas to nodes with more than 100GB of free disk space or, assign replicas where there is<br />

more disk space.<br />

Do not assign any replica on a given host because I want to run an overseer there.<br />

Assign only one replica of a shard in a rack.<br />

Assign replica in nodes hosting less than 5 cores.<br />

Assign replicas in nodes hosting the least number of cores.<br />

Rule Conditions<br />

A rule is a set of conditions that a node must satisfy before a replica core can be created there.<br />

Rule Conditions<br />

There are three possible conditions.<br />

shard: this is the name of a shard or a wild card (* means for all shards). If shard is not specified, then the<br />

rule applies to the entire collection.<br />

replica: this can be a number or a wild-card (* means any number zero to infinity).<br />

tag: this is an attribute of a node in the cluster that can be used in a rule, e.g. “freedisk”, “cores”, “rack”,<br />

“dc”, etc. The tag name can be a custom string. If creating a custom tag, a snitch is responsible for<br />

providing tags and values. The section Snitches below describes how to add a custom tag, and defines<br />

six pre-defined tags (cores, freedisk, host, port, node, and sysprop).<br />

Rule Operators<br />

A condition can have one of the following operators to set the parameters for the rule.<br />

equals (no operator required): tag:x means tag value must be equal to ‘x’<br />

greater than (>): tag:>x means tag value greater than ‘x’. x must be a number<br />

less than (

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

Saved successfully!

Ooh no, something went wrong!