[ https://issues.apache.org/jira/browse/SOLR-11608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16271575#comment-16271575 ]
ASF subversion and git services commented on SOLR-11608: -------------------------------------------------------- Commit ebdaa44182cf4e017efc418134821291dc40ea46 in lucene-solr's branch refs/heads/master from [~anshumg] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=ebdaa44 ] SOLR-11608: Correctly parse the new core-name in the V2 core rename API. > 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 > Assignee: Anshum Gupta > Priority: Minor > Attachments: SOLR-11608.patch, SOLR-11608.patch, 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-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org