Config Sets

On a multicore Solr instance, you may find that you want to share configuration between a number of different cores. You can achieve this using named configsets, which are essentially shared configuration directories stored under a configurable configset base directory.

Configsets are made up of the configuration files used in a Solr installation: inclduding solrconfig.xml, the schema, language-files, synonyms.txt, DIH-related configuration, and others as needed for your implementation.

Solr ships with two example configsets located in server/solr/configsets, which can be used as a base for your own. These example configsets are named _default and sample_techproducts_configs.

Configsets in Standalone Mode

If you are using Solr in standalone mode, configsets are created on the filesystem.

To create a configset, add a new directory under the configset base directory. The configset will be identified by the name of this directory. Then into this copy the config directory you want to share. The structure should look something like this:

/<configSetBaseDir>
    /configset1
        /conf
            /managed-schema
            /solrconfig.xml
    /configset2
        /conf
            /managed-schema
            /solrconfig.xml

The default base directory is $SOLR_HOME/configsets. This path can be configured in solr.xml (see Format of solr.xml for details).

To create a new core using a configset, pass configSet as one of the core properties. For example, if you do this via the CoreAdmin API:

V1 API

curl http://localhost:8983/admin/cores?action=CREATE&name=mycore&instanceDir=path/to/instance&configSet=configset2

V2 API

curl -v -X POST -H 'Content-type: application/json' -d '{
  "create":[{
    "name": "mycore",
    "instanceDir": "path/to/instance",
    "configSet": "configSet2"}]}'
    http://localhost:8983/api/cores

Configsets in SolrCloud Mode

In SolrCloud mode, you can use the Configsets API to manage your configsets.