Shalin is right. If you read the documentation for CloudSolrServer you will see that:
*SolrJ client class to communicate with SolrCloud. Instances of this class communicate with Zookeeper to discover Solr endpoints for SolrCloud collections, and then use the LBHttpSolrServer to issue requests.* * * It uses *LBHttpSolrServer *for communication and that is what are you looking for. Here is explanation of constructing it: SolrServer lbHttpSolrServer = new LBHttpSolrServer("http://host1:8080/solr/","http://host2:8080/solr","http://host2:8080/solr"); //or if you wish to pass the HttpClient do as follows httpClient httpClient = new HttpClient(); SolrServer lbHttpSolrServer = new LBHttpSolrServer(httpClient,"http://host1:8080/solr/","http://host2:8080/solr","http://host2:8080/solr"); Than you can use it as a *SolrServer*. 2013/9/3 Shalin Shekhar Mangar <shalinman...@gmail.com> > CloudSolrServer can only be used if you are actually using SolrCloud > (i.e. a ZooKeeper aware setup). If you only have a multi-core setup, > then you can use LBHttpSolrServer. > > See http://wiki.apache.org/solr/LBHttpSolrServer > > On Tue, Aug 27, 2013 at 2:11 PM, Dharmendra Jaiswal > <dharmendra.jais...@gmail.com> wrote: > > Hello, > > > > I am using multi-core mechnism with Solr4.4.0. And each core is > dedicated to > > a > > particular client (each core is a collection) > > > > Like If we search data from SiteA, it will provide search result from > CoreA > > And if we search data from SiteB, it will provide search result from > CoreB > > and similar case with other client. > > > > Right now i am using HttpSolrServer (SolrJ API) for connecting with Solr > for > > search. > > As per my understanding it will try to connect directly to a particular > Solr > > instance for searching and if that node will be down searching will fail. > > please let me know if my assumption is wrong. > > > > My query is that is it possible to connect with Solr using > CloudSolrServer > > instead of HTTPSolrServer for searching. so that in case one node will be > > down cloud solr server will pick data from other instance of Solr. > > > > Any pointer and link will be helpful. it will be better if some one > shared > > me some example related to connection using ClouSolrServer. > > > > Note: I am Using Windows machine for deployment of Solr. And we are > indexing > > data from database using DIH > > > > Thanks, > > Dharmendra jaiswal > > > > > > > > -- > > View this message in context: > http://lucene.472066.n3.nabble.com/Can-we-used-CloudSolrServer-for-searching-data-tp4086766.html > > Sent from the Solr - User mailing list archive at Nabble.com. > > > > -- > Regards, > Shalin Shekhar Mangar. >