Search code examples
javasolrsolr4solrcloud

What is the command for the solr 4.10.1 to be run in SOLRCLOUD mode through java code


I have Solr 4.10.1 version installed on my machine. I have normally run the solr using the following command

java -jar start.jar --OPTIONS=start

Actually Now In my application data is continuously increasing so one single collection taking too much time to load data. So I am implementing SOLR CLOUD for the same to split the data into different shards. For that using the commands given below worked for me to manual create shard

$ bin/solr -e cloud

But I want to start SOLR CLOUD through passing parameters to start.jar command as if I start the normal solr wihtout cloud, and also I want to create shards automatically by passing the number of shards in the parameter list to start.jar.

Please me help out of the problem

Thanks in advance.


Solution

  • java -DzkClientTimeout=15000 -DzkRun=localhost:2181 -jar start.jar should do the trick.