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.

class<br />

enabled<br />

The class to use for logging. The corresponding JAR file must be available to solr, perhaps<br />

through a directive in solrconfig.xml.<br />

true/false - whether to enable logging or not.<br />

The element<br />

size<br />

Node<br />

threshold<br />

The number of log events that are buffered.<br />

Description<br />

The logging level above which your particular logging implementation will record. For example<br />

when using log4j one might specify DEBUG, WARN, INFO, etc.<br />

The element<br />

Custom shard handlers can be defined in solr.xml if you wish to create a custom shard handler.<br />

<br />

Since this is a custom shard handler, sub-elements are specific to the implementation.<br />

Substituting JVM System Properties in solr.xml<br />

<strong>Solr</strong> supports variable substitution of JVM system property values in solr.xml, which allows runtime<br />

specification of various configuration options. The syntax is ${propertyname[:option default value] }.<br />

This allows defining a default that can be overridden when <strong>Solr</strong> is launched. If a default value is not specified,<br />

then the property must be specified at runtime or the solr.xml file will generate an error when parsed.<br />

Any JVM system properties usually specified using the -D flag when starting the JVM, can be used as variables<br />

in the solr.xml file.<br />

For example, in the solr.xml file shown below, the socketTimeout and connTimeout values are each set<br />

to "0". However, if you start <strong>Solr</strong> using ' bin/solr -DsocketTimeout=1000', the socketTimeout option of<br />

the HttpShardHandlerFactory to be overridden using a value of 1000ms, while the connTimeout option<br />

will continue to use the default property value of "0".<br />

<br />

<br />

${socketTimeout:0}<br />

${connTimeout:0}<br />

<br />

<br />

Defining core.properties<br />

Core discovery means that creating a core is as simple as a core.properties file located on disk. The core.<br />

properties file is a simple Java Properties file where each line is just a key=value pair, e.g., name=core1.<br />

Notice that no quotes are required.<br />

A minimal core.properties file looks like this (however, it can also be empty, see information on placement<br />

of core.properties below):<br />

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

470

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

Saved successfully!

Ooh no, something went wrong!