[ 
https://issues.apache.org/jira/browse/SOLR-7316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Gerlowski resolved SOLR-7316.
-----------------------------------
    Resolution: Not A Problem

Closing this out for now.

If the docs were unclear about this in the 5.0 timeframe, they've come a good 
way since then and are [now pretty 
clear|https://solr.apache.org/guide/solr/latest/configuration-guide/coreadmin-api.html#coreadmin-create]
 about the need to specify *some* sort of pointer to config for the new core, 
and the options available for doing that.

{quote}
Note that CREATE must be able to find a configuration or it will not succeed.

When you are running SolrCloud and create a new core for a collection, the 
configuration will be inherited from the collection. Each collection is linked 
to a configName, which is stored in ZooKeeper. This satisfies the configuration 
requirement. That said, if you’re running SolrCloud, you should NOT use the 
CoreAdmin API at all. Instead, use the Collections API.

With a user-managed cluster, if you have Configsets defined, you can use the 
configSet parameter as documented below. If there are no configsets, then the 
instanceDir specified in the CREATE call must already exist, and it must 
contain a conf directory which in turn must contain solrconfig.xml, your schema 
(usually named either managed-schema.xml or schema.xml), and any files 
referenced by those configs.
{quote}

(Ideally we'd eventually sunset this API entirely, as it is unpleasantly 
low-level.  But that will be very difficult while "user-managed" remains a 
supported mode.)

> API to create a core is broken
> ------------------------------
>
>                 Key: SOLR-7316
>                 URL: https://issues.apache.org/jira/browse/SOLR-7316
>             Project: Solr
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 5.0
>            Reporter: Mark Haase
>            Priority: Major
>
> *Steps To Reproduce*
> {code}
> curl 
> 'http://localhost:8983/solr/admin/cores?action=CREATE&name=new_core&instanceDir=new_core'
> {code}
> *Expected Result*
> Create a core called "new_core".
> *Actual Result*
> {quote}
> Error CREATEing SolrCore 'new_core': Unable to create core [new_core] Caused 
> by: Can't find resource 'solrconfig.xml' in classpath or 
> '/var/solr/data/new_core/conf'
> {quote}
> Somebody on solr-users tells me:
> {quote}
> The CoreAdmin API requires that the instanceDir already exist, with a
> conf directory inside it that contains solrconfig.xml, schema.xml, and
> any other necessary config files.
> {quote}
> Huh? Where is this magical knowledge mentioned in the [API 
> documentation|https://cwiki.apache.org/confluence/display/solr/CoreAdmin+API]?
> Another user on the list serve says:
> {quote}
> In fact, yes. The thing to remember here is that you're using a much
> older approach that had its roots in the pre-cloud days.
> {quote}
> *The whole point of creating APIs is to abstract out details that the caller 
> doesn't need to know, and yet this API requires an understanding of Solr's 
> internal file structure and history of the project?* I'm speechless.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to