Apache Solr Documentation

6.5 Ref Guide (PDF Download)
Solr Tutorial
Solr Community Wiki

Older Versions of this Guide (PDF)

6.6 Draft Ref Guide Topics

Meta-Documentation

This Unreleased Guide Covers Apache Solr 6.6
As of 5 May 2017, committer editing of this Ref Guide is LOCKED for migration to the new Ref Guide. See SOLR-10290 for details.

Skip to end of metadata
Go to start of metadata

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.

To create a configset, simply 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:

The default base directory is $SOLR_HOME/configsets, and it can be configured in solr.xml.

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

http://<solr>/admin/cores?action=CREATE&name=mycore&instanceDir=path/to/instance&configSet=configset2

 

  • No labels

5 Comments

  1. The example admin API call should be http://<solr>/admin/cores?...

    The path segment admin seems to be needed (and is used here as well: CoreAdmin API)

    1. fixed, thanks for pointing this out!

  2. In Managed Schema Mode:

    Is there an option to copy a configSet when a core is created instead of sharing it with another core?

    Because after a restart of the server all derived cores would share the same config. Even if some field might have changed.

  3. Can someone explain why I am getting the following result?

    alex@solrcloud01:/opt/solr/myproducts/conf$ curl -XPOST http://localhost:8983/solr/admin/cores?action=CREATE&name=myproducts&instanceDir=/opt/solr/myproducts&configSet=configset2
    [1] 2601
    [2] 2602
    [3] 2603

    alex@solrcloud01:/opt/solr/myproducts/conf$ <?xml version="1.0" encoding="UTF-8"?>
    <response>
    <lst name="responseHeader"><int name="status">400</int><int name="QTime">0</int></lst><lst name="error"><lst name="metadata"><str name="error-class">org.apache.solr.common.SolrException</str><str name="root-error-class">org.apache.solr.common.SolrException</str></lst><str name="msg">Missing required parameter: name</str><int name="code">400</int></lst>
    </response>

    [1] Done curl -XPOST http://localhost:8983/solr/admin/cores?action=CREATE
    [2]- Done name=myproducts
    [3]+ Done instanceDir=/opt/solr/myproducts
    alex@solrcloud01:/opt/solr/myproducts/conf$

    1. Alex, the users list is usually better for these kinds of questions. I believe you are missing the quotes around the url.