Solr Cores and solr.xml

In Solr, the term core is used to refer to a single index and associated transaction log and configuration files (including the solrconfig.xml and Schema files, among others). Your Solr installation can have multiple cores if needed, which allows you to index data with different structures in the same server, and maintain more control over how your data is presented to different audiences. In SolrCloud mode you will be more familiar with the term collection. Behind the scenes a collection consists of one or more cores.

Cores can be created using bin/solr script or as part of SolrCloud collection creation using the APIs. Core-specific properties (such as the directories to use for the indexes or configuration files, the core name, and other options) are defined in a core.properties file. Any core.properties file in any directory of your Solr installation (or in a directory under where solr_home is defined) will be found by Solr and the defined properties will be used for the core named in the file.

In standalone mode, solr.xml must reside in solr_home. In SolrCloud mode, solr.xml will be loaded from ZooKeeper if it exists, with fallback to solr_home.

In older versions of Solr, cores had to be predefined as <core> tags in solr.xml in order for Solr to know about them. Now, however, Solr supports automatic discovery of cores and they no longer need to be explicitly defined. The recommended way is to dynamically create cores/collections using the APIs.

The following sections describe these options in more detail.

  • Format of solr.xml: Details on how to define solr.xml, including the acceptable parameters for the solr.xml file

  • Defining core.properties: Details on placement of core.properties and available property options.

  • CoreAdmin API: Tools and commands for core administration using a REST API.

  • Config Sets: How to use configsets to avoid duplicating effort when defining a new core.

Comments on this Page

We welcome feedback on Solr documentation. However, we cannot provide application support via comments. If you need help, please send a message to the Solr User mailing list.