[
https://issues.apache.org/jira/browse/SOLR-7316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16192194#comment-16192194
]
Jason Gerlowski commented on SOLR-7316:
---------------------------------------
>From my reading of the JIRA, there are two aspects of Mark's concerns here:
1. There should be a default configSet. As you pointed out Steve, this is done.
2. For user-friendliness, the {{CreateCores}} API should use the default
configset {{_default}} when the configSet parameter isn't specified. This
hasn't been addressed, one way or another.
The create-cores API still fails with the same error message originally
reported by Mark:
{code}
[~/c/l/solr] $ curl -ilk
'http://localhost:8983/solr/admin/cores?action=CREATE&name=new_core&instanceDir=new_core'
{
"responseHeader":{
"status":400,
"error":{
"metadata":[
"error-class","org.apache.solr.common.SolrException",
"msg":"Error CREATEing SolrCore 'new_core': Unable to create core
[new_core] Caused by: Can't find resource 'solrconfig.xml' in classpath or
'/home/asdf/checkouts/lucene-solr/solr/server/solr/new_core'",
"code":400}}
{code}
Not that I necessarily agree with Mark's points. Quietly allowing a core to be
created with the {{_default}} configset _would_ make getting started a little
less painless. But it also introduces trappy behavior for those who just
messed up their API call and forgot the parameter. There's tradeoffs here.
So I don't necessarily agree, but it's tough to close this, unless you were
going to close it as "wont-fix".
> 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
>
> *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
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]