Currently, I think it's a bit ragged. You need to "upconfig", but the
tool to do that is ZkCli, something like:

java -classpath example/solr-webapp/WEB-INF/lib/*
org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost 127.0.0.1:9983
-confdir example/solr/mycoreconf/conf -confname mycore

I took a very brief look around the solrj code
(org.apache.solr.common.cloud) and it looks like that's for reading
more than writing.

So (and someone correct me if I'm wrong), it looks like uploading
configurations isn't supported from within SolrJ.

Best
Erick

On Wed, Apr 24, 2013 at 4:03 AM, Vijay Tiwary (JIRA) <j...@apache.org> wrote:
> Vijay Tiwary created SOLR-4755:
> ----------------------------------
>
>              Summary: Solr cloud 4.1.0 - core creation problem
>                  Key: SOLR-4755
>                  URL: https://issues.apache.org/jira/browse/SOLR-4755
>              Project: Solr
>           Issue Type: Test
>           Components: clients - java
>     Affects Versions: 4.1
>          Environment: linux
>             Reporter: Vijay Tiwary
>             Priority: Critical
>
>
> I am trying to create core dynamically through my java appliction in solr 
> cloud having two shard.
>
>
>     CloudSolrServer cloudSolrServer = new CloudSolrServer("localhost:9983", 
> new LBHttpSolrServer  ("http://localhost:8983/solr";));
>     CoreAdminRequest.Create req = new CoreAdminRequest.Create() {
>
>                          private static final long serialVersionUID = 
> -8825247378713661625L;
>
>                                 @Override public SolrParams getParams() {
>                                 ModifiableSolrParams modifiableSolrParams =   
>    (ModifiableSolrParams) super.getParams();
>                                 
> modifiableSolrParams.set("collection.configName", "mycore");
>                                 return modifiableSolrParams;
>                                 }
>                         };
>
>     req.setInstanceDir("/solr/master/mycorepath");
>     req.setCollection("mycore");
>
>     CoreAdminResponse res = req.process(cloudSolrServer.getLbServer());
>
>
>
> However i am getting the error:
> **Specified config does not exist in ZooKeeper:mycore**
>
> When I checked in the solr admin console I found the collection "mycore" is 
> not completely created[i.e it does not have the folder symbol] and there is 
> no config with the name "mycore".
>
> **How do I go about this problem. What is the standard way for creating core 
> dynamically in a 2 shard solr cloud (solr 4.1.0)?**
>
>
>
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA administrators
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
> For additional commands, e-mail: dev-h...@lucene.apache.org
>

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

Reply via email to