Generating collection configuration using configs

You must create a collection configuration prior to creating a Solr collection. The configuration files are created in ZooKeeper based on existing templates using the ConfigSets API. Learn how to create one using configs.

Configs are named configuration sets that you can reference when creating collections.

You can manage configuration objects directly using the solrctl config command, which is a wrapper script for the Solr ConfigSets API.

solrctl config --create [***NEW CONFIG***] [***TEMPLATE***] [-p [***NAME***]=[***VALUE***]]
  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 generate configuration files for a collection, run the following command:
    solrctl config --create [***NEW CONFIG***] [***TEMPLATE***] -p immutable=false
    [***NEW CONFIG***]
    is the user-specified name of the config
    is the name of an existing config template
    To list all available config templates, use the solrctl instancedir --list command.
    -p [***NAME***]=[***VALUE***]
    Overrides a [***TEMPLATE***] setting. The only config property that you can override is immutable, so the possible options are -p immutable=true and -p immutable=false. If you are copying an immutable config, such as a template, use -p immutable=false to make sure that you can edit the new config.
    For example, to create the configuration logs_config based on managedTemplate:
    solrctl config --create logs_config managedTemplate -p immutable=false