You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jason Gerlowski (JIRA)" <ji...@apache.org> on 2017/11/05 18:37:00 UTC

[jira] [Updated] (SOLR-11608) V2 Core-Rename API fails to parse new core name

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

Jason Gerlowski updated SOLR-11608:
-----------------------------------
    Attachment: repro.sh

Trivial script reproducing the issue on Linux.

> V2 Core-Rename API fails to parse new core name
> -----------------------------------------------
>
>                 Key: SOLR-11608
>                 URL: https://issues.apache.org/jira/browse/SOLR-11608
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: v2 API
>    Affects Versions: 7.1, master (8.0)
>            Reporter: Jason Gerlowski
>            Priority: Minor
>         Attachments: repro.sh
>
>
> I noticed recently that the v2 Solr API's rename-core command fails to parse out the provided "to" parameter (which contains the desired new core name).
> {{_introspect}} shows the following documentation for the API:
> {code}
>         "rename":{
>           "type":"object",
>           "documentation":"https://lucene.apache.org/solr/guide/coreadmin-api.html#coreadmin-rename",
>           "description":"Change the name of a core.",
>           "properties":{
>             "to":{
>               "type":"string",
>               "description":"The new name for the core."},
>             "async":{
>               "type":"string",
>               "description":"Defines a request ID that can be used to track this action after it's submitted. The action will be processed asynchronously when this is defined."}},
>           "required":["to"]},
> {code}
> but it appears that the underlying code fails to parse out the "to" parameter:
> {code}
> ➜  solr git:(master) ✗ curl -ilk -X POST "$SOLR_HOST/api/cores/foo" -d '{"rename": {"to":"bar"}}'
> HTTP/1.1 400 Bad Request
> Content-Type: application/json;charset=utf-8
> Content-Length: 381
> {
>   "responseHeader":{
>     "status":400,
>     "QTime":0},
>   "error":{
>     "metadata":[
>       "error-class","org.apache.solr.common.SolrException",
>       "root-error-class","org.apache.solr.common.SolrException"],
>     "msg":"Invalid core: [null]. core names must consist entirely of periods, underscores, hyphens, and alphanumerics as well not start with a hyphen",
>     "code":400}}
> {code}
> I'm not super familiar with the V2<->V1 API mapping code, but it looks like the underlying implementation in {{CoreAdminOperation}} is expecting a parameter named "other", but there's no mapping from "to" -> "other" for this particular API.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org