[ 
https://issues.apache.org/jira/browse/SOLR-5306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13787852#comment-13787852
 ] 

Liang Tianyu commented on SOLR-5306:
------------------------------------

I add some code at line 453 in class CoreAdminHandler:
String opts = params.get(CoreAdminParams.CONFIG);
    CloudDescriptor cd = dcore.getCloudDescriptor();
    
    if (cd != null) {
      cd.setParams(req.getParams());

      opts = params.get(CoreAdminParams.COLLECTION);
      if (opts != null)
        cd.setCollectionName(opts);
      
      opts = params.get(CoreAdminParams.SHARD);
      if (opts != null)
        cd.setShardId(opts);
      
      opts = params.get(CoreAdminParams.SHARD_RANGE);
      if (opts != null)
        cd.setShardRange(opts);

      opts = params.get(CoreAdminParams.SHARD_STATE);
      if (opts != null)
        cd.setShardState(opts);
      
      opts = params.get(CoreAdminParams.ROLES);
      if (opts != null)
        cd.setRoles(opts);
      
      opts = params.get(CoreAdminParams.CORE_NODE_NAME);
      if (opts != null)
        cd.setCoreNodeName(opts);
                      
      Integer numShards = params.getInt(ZkStateReader.NUM_SHARDS_PROP);
      if (numShards != null)
        cd.setNumShards(numShards);
    }

test passed.

> can not create collection when have over one config
> ---------------------------------------------------
>
>                 Key: SOLR-5306
>                 URL: https://issues.apache.org/jira/browse/SOLR-5306
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 4.5
>         Environment: win7 jdk 7
>            Reporter: Liang Tianyu
>            Priority: Critical
>
> I have uploaded zookeeper two config: patent and applicant. I can not create 
> collection:http://localhost:8080/solr/admin/collections?action=CREATE&name=patent_main_1&numShards=1&collection.configName=patent.show
>  errors:patent_main_1_shard1_replica1: 
> org.apache.solr.common.cloud.ZooKeeperException:org.apache.solr.common.cloud.ZooKeeperException:
>  Could not find configName for collection patent_main_1 found:[applicant, 
> patent]. In solr 4.4 I can create sucessfully.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

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

Reply via email to