ConfigSets API

The ConfigSets API enables you to create, delete, and otherwise manage ConfigSets.

To use a ConfigSet created with this API as the configuration for a collection, use the Collections API.

This API can only be used with Solr running in SolrCloud mode. If you are not running Solr in SolrCloud mode but would still like to use shared configurations, please see the section Config Sets.

API Entry Points

The base URL for all API calls is http://<hostname>:<port>/solr.

  • /admin/configs?action=CREATE: create a ConfigSet, based on an existing ConfigSet

  • /admin/configs?action=DELETE: delete a ConfigSet

  • /admin/configs?action=LIST: list all ConfigSets

  • /admin/configs?action=UPLOAD: upload a ConfigSet

Create a ConfigSet

/admin/configs?action=CREATE&name=name&baseConfigSet=baseConfigSet

Create a ConfigSet, based on an existing ConfigSet.

Input

Key Type Required Default Description

name

String

Yes

ConfigSet to be created

baseConfigSet

String

Yes

ConfigSet to copy as a base

configSetProp.name=value

String

No

ConfigSet property from base to override

Output

Output Content

The output will include the status of the request. If the status is anything other than "success", an error message will explain why the request failed.

Examples

Input

Create a ConfigSet named 'myConfigSet' based on a 'predefinedTemplate' ConfigSet, overriding the immutable property to false.

http://localhost:8983/solr/admin/configs?action=CREATE&name=myConfigSet&baseConfigSet=predefinedTemplate&configSetProp.immutable=false

Output

<response>
  <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">323</int>
  </lst>
</response>

Delete a ConfigSet

/admin/configs?action=DELETE&name=name

Delete a ConfigSet

Input

Query Parameters

Key Type Required Default Description

name

String

Yes

ConfigSet to be deleted

Output

Output Content

The output will include the status of the request. If the status is anything other than "success", an error message will explain why the request failed.

Examples

Input

Delete ConfigSet 'myConfigSet'

http://localhost:8983/solr/admin/configs?action=DELETE&name=myConfigSet

Output

<response>
  <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">170</int>
  </lst>
</response>

List ConfigSets

/admin/configs?action=LIST

Fetch the names of the ConfigSets in the cluster.

Examples

Input

http://localhost:8983/solr/admin/configs?action=LIST&wt=json

Output

{
  "responseHeader":{
    "status":0,
    "QTime":203},
  "configSets":["myConfigSet1",
    "myConfig2"]}

Upload a ConfigSet

/admin/configs?action=UPLOAD&name=name

Upload a ConfigSet, sent in as a zipped file. Please note that a ConfigSet is uploaded in a "trusted" mode if authentication is enabled and this upload operation is performed as an authenticated request. Without authentication, a ConfigSet is uploaded in an "untrusted" mode. Upon creation of a collection using an "untrusted" ConfigSet, the following functionality would not work:

  • RunExecutableListener does not initialize, if specified in the ConfigSet.

  • DataImportHandler’s ScriptTransformer does not initialize, if specified in the ConfigSet.

  • XSLT transformer (tr parameter) cannot be used at request processing time.

  • StatelessScriptUpdateProcessor does not initialize, if specified in the ConfigSet.

Input

Key Type Required Default Description

name

String

Yes

ConfigSet to be created

The body of the request should contain a zipped config set.

Output

Output Content

The output will include the status of the request. If the status is anything other than "success", an error message will explain why the request failed.

Examples

Create a ConfigSet named 'myConfigSet' based on a 'predefinedTemplate' ConfigSet, overriding the immutable property to false.

curl -X POST -d @myconfigset.zip http://localhost:8983/solr/admin/configs?action=CREATE&name=myConfigSet --header "Content-Type:text/xml"