You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Shalin Shekhar Mangar <sh...@gmail.com> on 2013/09/03 18:07:47 UTC

Re: Can we used CloudSolrServer for searching data

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
<dh...@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.

Re: Can we used CloudSolrServer for searching data

Posted by Dharmendra Jaiswal <dh...@gmail.com>.
Thanks for your reply.

I am using Solrcloud with zookeeper setup.
And using CloudSolrServer for both indexing and searching.
As per my understanding CloudSolrserver by default using LBHttpSolrServer.
And CloudSolrServer connect to Zookeeper and passing all the running server
node to LBHttpSolrServer.

Thanks for you guys once again for your reply.




--
View this message in context: http://lucene.472066.n3.nabble.com/Can-we-used-CloudSolrServer-for-searching-data-tp4086766p4089475.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Can we used CloudSolrServer for searching data

Posted by Furkan KAMACI <fu...@gmail.com>.
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 <sh...@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
> <dh...@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.
>