lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Taylor <Russell.Tay...@interactivedata.com>
Subject RE: using SolrJ with SolrCloud, searching multiple indexes.
Date Sat, 22 Mar 2014 13:34:25 GMT
Yeah sorry didn't explain myself there, one of the three zookeepers will return me one of the
solrcloud machines for me to access the index. I either need to know which machine it returned(is
this feasible I can't seem to find a way to access information in SolrCloudServer)  and then
add the extra indexes as shards 
String shards = solrCloudMachine+":8080/indexB,"+solrCloudMachine+":8080/indexC"
(solrQuery.add("shards",shards);) 

or do it in a new way within solrcloud.

FYI
My returned index is one of seven indexes under one webapp (solr_search) I want to stitch
on the other six indexes so I can search all of the data (each index is updated from separate
feeds).



Thanks for your quick reply.

Russ.
 
________________________________________
From: Furkan KAMACI [furkankamaci@gmail.com]
Sent: 21 March 2014 22:55
To: solr-user@lucene.apache.org
Subject: Re: using SolrJ with SolrCloud, searching multiple indexes.

Hi Russell;

You say that:

  | CloudSolrServer server = new CloudSolrServer("solrServer1:
2111,solrServer2:2111,solrServer2:2111");

but I should mention that they are not Solr Servers that is passed into a
CloudSolrServer. They are zookeeper host:port pairs optionally includes a
chroot parameter at the end.

Thanks;
Furkan KAMACI



2014-03-21 18:11 GMT+02:00 Russell Taylor <
Russell.Taylor@interactivedata.com>:

> Hi,
> just started to move my SolrJ queries over to our SolrCloud  environment
> and I  want to know how to do a query  where you combine multiple indexes.
>
> Previously I had a string called shards which links all the indexes
> together and adds them to the query.
> String shards =
> "server:8080/solr_search/bonds,server:8080/solr_search/equities,etc"
> which I add to my SolrQuery
> solrQuery.add("shards",shards);
> I can then search across many indexes.
>
> In SolrCloud we do this
> CloudSolrServer server = new
> CloudSolrServer("solrServer1:2111,solrServer2:2111,solrServer2:2111");
> and add the default collection
> server.setDefaultCollection(bonds);
>
> How do I add the other indexes to my query in CloudSolrServer? If it's as
> before solrQuery.add("shards",shards); how do I find out the address of the
> machine CloudSolrServer has chosen?
>
>
>
> Thanks
>
>
> Russ.
>
>
> *******************************************************
> This message (including any files transmitted with it) may contain
> confidential and/or proprietary information, is the property of Interactive
> Data Corporation and/or its subsidiaries, and is directed only to the
> addressee(s). If you are not the designated recipient or have reason to
> believe you received this message in error, please delete this message from
> your system and notify the sender immediately. An unintended recipient's
> disclosure, copying, distribution, or use of this message or any
> attachments is prohibited and may be unlawful.
> *******************************************************
>


*******************************************************
This message (including any files transmitted with it) may contain confidential and/or proprietary
information, is the property of Interactive Data Corporation and/or its subsidiaries, and
is directed only to the addressee(s). If you are not the designated recipient or have reason
to believe you received this message in error, please delete this message from your system
and notify the sender immediately. An unintended recipient's disclosure, copying, distribution,
or use of this message or any attachments is prohibited and may be unlawful. 
*******************************************************


Mime
View raw message