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
In older versions of Solr, cores had to be predefined as
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
- Defining core.properties: Details on placement of
core.propertiesand 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.