Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-15312

v2 api: core creation, config vs configSet params

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • v2 API
    • None

    Description

      I tried to follow our ref guide's instructions on how to create a core with a certain configSet using the V2 API. It has me specify the "configSet" param. But it does not work... the generated core.properties file contains the "configSet" reference and unexpectedly a "config" reference. Since I have a normally named solrconfig.xml, this fails core creation.

      I figured out the bug is here: https://github.com/apache/solr/blob/4e90e48ac29ee38662c04fcf7815d5170ceb2669/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreApiMapping.java#L43 which maps "config" to "configSet". But these are distinct things. If you were to introspect the core creation api you would see these two parameter definitions:

      "config":{
                    "type":"string",
                    "description":"Name of the config file (i.e., solrconfig.xml) relative to instanceDir. If you are using the default name (solrconfig.xml), you do not need to define the config file name."},
                  "configSet":{
                    "type":"string",
                    "documentation":"https://lucene.apache.org/solr/guide/config-sets.html",
                    "description":"The name of a config set to use. The config set must already exist. The solr.xml file defines the location of the configset base directory, and configuration files can be shared between cores by defining sub-directories. The files in the named configSet will be used for the schema and config properties instead of defining them explicitly."},
      

      There is also a "schema" param for the file name of the schema.

      I see two courses of action. One keeps the current introspect API and is trivially implemented at the line of code I showed, replacing the mapping with null. Or, use "config" for the configSet, and rename "config" and "schema" params to "configFile" and "schemaFile" respectively (or some other names). The point of the latter is to align SolrCloud with standalone API on the semantics of what "config" refers to.

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dsmiley David Smiley
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: