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.

In <strong>Solr</strong>, the term core is used to refer to a single index and associated transaction log and configuration files<br />

(including the solrconfig.xml and Schema files, among others). Your <strong>Solr</strong> installation can have multiple<br />

cores if needed, which allows you to index data with different structures in the same server, and maintain more<br />

control over how your data is presented to different audiences. In <strong>Solr</strong>Cloud mode you will be more familiar with<br />

the term collection. Behind the scenes a collection consists of one or more cores.<br />

Cores can be created using bin/solr script or as part of <strong>Solr</strong>Cloud collection creation using the APIs. Core-spe<br />

cific properties (such as the directories to use for the indexes or configuration files, the core name, and other<br />

options) are defined in a core.properties file. Any core.properties file in any directory of your <strong>Solr</strong><br />

installation (or in a directory under where solr_home is defined) will be found by <strong>Solr</strong> and the defined properties<br />

will be used for the core named in the file.<br />

In standalone mode, solr.xml must reside in solr_home. In <strong>Solr</strong>Cloud mode, solr.xml will be loaded from<br />

Zookeeper if it exists, with fallback to solr_home.<br />

In older versions of <strong>Solr</strong>, cores had to be predefined as tags in solr.xml in order for <strong>Solr</strong> to<br />

know about them. Now, however, <strong>Solr</strong> supports automatic discovery of cores and they no longer need to<br />

be explicitly defined. The recommended way is to dynamically create cores/collections using the APIs.<br />

The following sections describe these options in more detail.<br />

Format of solr.xml: Details on how to define solr.xml, including the acceptable parameters for the sol<br />

r.xml file<br />

Defining core.properties: Details on placement of core.properties and available property options.<br />

CoreAdmin API: Tools and commands for core administration using a REST API.<br />

Config Sets: How to use configsets to avoid duplicating effort when defining a new core.<br />

Format of solr.xml<br />

This section will describe the default solr.xml file included with <strong>Solr</strong> and how to modify it for your needs. For<br />

details on how to configure core.properties, see the section Defining core.properties.<br />

Defining solr.xml<br />

<strong>Solr</strong>.xml Parameters<br />

The Element<br />

The element<br />

The element<br />

The element<br />

The element<br />

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

Defining solr.xml<br />

You can find solr.xml in your <strong>Solr</strong> Home directory or in Zookeeper. The default solr.xml file looks like this:<br />

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

467

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

Saved successfully!

Ooh no, something went wrong!