Modifying a collection configuration generated using an instance directory

The configuration files for a Solr collection are stored in a directory called instance directories. Learn how to modify the directory and make it available to Solr by uploading the contents to ZooKeeper.

In this case, configuration files for a collection are contained in a directory called an instance directory. An instance directory is a named set of configuration files. You can download and edit the configuration locally and then upload the directory to ZooKeeper as a named configuration set. If your instance directory is already referenced by a collection, make sure to reload it for configuration changes to take effect.
  1. If you are using Kerberos, kinit as a user with permission to create the collection configuration:
    kinit solradmin@[***EXAMPLE.COM***]

    Replace [***EXAMPLE.COM***] with your Kerberos realm name.

  2. To download a template instance directory, run the following command:
    solrctl instancedir --get $HOME/solr_configs
  3. Customize the collection by directly editing the solrconfig.xml and schema.xml files.
  4. After completing the configuration, make it available to Solr by running the following command, which uploads the contents of the instance directory to ZooKeeper:
    solrctl config --upload [***COLLECTION_NAME***] $HOME/solr_configs
    For example:
    solrctl config --upload weblogs $HOME/solr_configs
  5. Use the solrctl utility to verify that your instance directory uploaded successfully and is available to ZooKeeper. List the uploaded instance directories as follows:
    solrctl instancedir --list

    If you used the --create command to create a collection named weblogs, the --list command returns weblogs.

  6. After uploading the updated collection configuration. you need to reload every collection referencing that instancce directory for the updates to take effect.
    solrctl collection --reload [***COLLECTION_NAME***]