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.

name=my_core_name<br />

Placement of core.properties<br />

<strong>Solr</strong> cores are configured by placing a file named core.properties in a sub-directory under solr.home.<br />

There are no a-priori limits to the depth of the tree, nor are there limits to the number of cores that can be<br />

defined. Cores may be anywhere in the tree with the exception that cores may not be defined under an existing<br />

core. That is, the following is not allowed:<br />

./cores/core1/core.properties<br />

./cores/core1/coremore/core5/core.properties<br />

In this example, the enumeration will stop at "core1".<br />

The following is legal:<br />

./cores/somecores/core1/core.properties<br />

./cores/somecores/core2/core.properties<br />

./cores/othercores/core3/core.properties<br />

./cores/extracores/deepertree/core4/core.properties<br />

It is possible to segment <strong>Solr</strong> into multiple cores, each with its own configuration and indices. Cores may be<br />

dedicated to a single application or to very different ones, but all are administered through a common<br />

administration interface. You can create new <strong>Solr</strong> cores on the fly, shutdown cores, even replace one running<br />

core with another, all without ever stopping or restarting <strong>Solr</strong>.<br />

Your core.properties file can be empty if necessary. Suppose core.properties is located in ./cores/c<br />

ore1 (relative to solr_home ) but is empty. In that case, the core name is assumed to be "core1". The<br />

instanceDir will be the folder containing core.properties (i.e., ./cores/core1). The dataDir will be ../cor<br />

es/core1/data, etc.<br />

You can run <strong>Solr</strong> without configuring any cores.<br />

Defining core.properties Files<br />

The minimal core.properties file is an empty file, in which case all of the properties are defaulted<br />

appropriately.<br />

Java properties files allow the hash ("#") or bang ("!") characters to specify comment-to-end-of-line.<br />

This table defines the recognized properties:<br />

name<br />

Property<br />

Description<br />

The name of the <strong>Solr</strong>Core. You'll use this name to reference the <strong>Solr</strong>Core when running<br />

commands with the CoreAdminHandler.<br />

config The configuration file name for a given core. The default is solrconfig.xml.<br />

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

471

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

Saved successfully!

Ooh no, something went wrong!