On 2/10/2016 6:55 AM, vidya wrote: > I want to connect to solrCloud server from java program using > zookeeperHost variable. I know that data can be indexed and searched from a > collection using java program. but Can i able to create a collection > initially from java program?
Yes. Use the CloudSolrClient object in the SolrJ API. It accepts a zkHost string. https://cwiki.apache.org/confluence/display/solr/Using+SolrJ I'm not sure exactly how to do the collection create, but it will probably involve this object: https://lucene.apache.org/solr/5_4_1/solr-solrj/org/apache/solr/client/solrj/request/CollectionAdminRequest.Create.html > My problem is that i cannot access solr web page, i'm getting an error like > "defected tokens detected". So, i wanted to connect to solr using solrj API. > For that I need to create a collection initially.Got struck here. This does not sound like an error generated by Solr. It must be coming from some other aspect of your environment. Can you get a screenshot or log entry showing the problem, place it on the Internet somewhere, and provide a link? Thanks, Shawn