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 Benjamin Ryan <be...@manchester.ac.uk> on 2013/05/14 13:37:01 UTC

Query mulitiple cores using intermediate core

Hi,
                I have seen posts etc on how to setup a core that has a merged schema and request handlers to enable search across two other cores.
                Can anybody give an example of how the request handler in the "merged" core is defined so that it will query over the two other shards.
                This has been explained here (http://stackoverflow.com/questions/2139030/search-multiple-solr-cores-and-return-one-result-set) but I cannot work how the shard parameter should be specified (in an invariant?).

Regards,
                Ben

------------------------------------------------------------------
Dr Ben Ryan
Jorum Technical Coordinator (Services)

5.13 Roscoe Building
The University of Manchester
Oxford Road
Manchester
M13 9PL
Tel: 0161 275 0632
E-mail: benjamin.ryan@manchester.ac.uk<ma...@manchester.ac.uk>
------------------------------------------------------------------


Re: Query mulitiple cores using intermediate core

Posted by Shawn Heisey <so...@elyograg.org>.
On 5/14/2013 5:37 AM, Benjamin Ryan wrote:
> I have seen posts etc on how to setup a core that has a merged schema and request handlers to enable search across two other cores.
> Can anybody give an example of how the request handler in the "merged" core is defined so that it will query over the two other shards.
> This has been explained here (http://stackoverflow.com/questions/2139030/search-multiple-solr-cores-and-return-one-result-set) but I cannot work how the shard parameter should be specified (in an invariant?).

The Solr version really doesn't matter.  I've used this with several
versions from 1.4.0 up through 4.2.1 with no problem.  You need an
identical schema and a similar solrconfig for all the cores.  I say
similar, because you don't want the shards parameter in the cores that
have the data, just in the core that you query.

I just put the shards parameter in the defaults section of the request
handler, but putting it into invariants instead seems like a really good
idea.  That would ensure that it's impossible to override it.

<str
name="shards">server:8982/solr/inclive,server:8982/solr/s0live,server:8982/solr/s1live,server:8982/solr/s2live,server:8982/solr/s3live,server:8982/solr/s4live,server:8982/solr/s5live</str>

You might also need the shards.qt parameter, if the distributed queries
should end up someplace other than /select.

Thanks,
Shawn


RE: Query mulitiple cores using intermediate core

Posted by Benjamin Ryan <be...@manchester.ac.uk>.
Hi,
	Currently 3.3 but I could move to 4.x if needed.

Regards,
	Ben

------------------------------------------------------------------
Dr Ben Ryan
Jorum Technical Manager

5.12 Roscoe Building
The University of Manchester
Oxford Road
Manchester
M13 9PL
Tel: 0160 275 6039
E-mail: benjamin.ryan@manchester.ac.uk
------------------------------------------------------------------


-----Original Message-----
From: Furkan KAMACI [mailto:furkankamaci@gmail.com] 
Sent: 14 May 2013 22:01
To: solr-user@lucene.apache.org
Subject: Re: Query mulitiple cores using intermediate core

Which version of Solr do you use?


2013/5/14 Benjamin Ryan <be...@manchester.ac.uk>

> Hi,
>                 I have seen posts etc on how to setup a core that has 
> a merged schema and request handlers to enable search across two other cores.
>                 Can anybody give an example of how the request handler 
> in the "merged" core is defined so that it will query over the two 
> other shards.
>                 This has been explained here (
> http://stackoverflow.com/questions/2139030/search-multiple-solr-cores-
> and-return-one-result-set) but I cannot work how the shard parameter 
> should be specified (in an invariant?).
>
> Regards,
>                 Ben
>
> ------------------------------------------------------------------
> Dr Ben Ryan
> Jorum Technical Coordinator (Services)
>
> 5.13 Roscoe Building
> The University of Manchester
> Oxford Road
> Manchester
> M13 9PL
> Tel: 0161 275 0632
> E-mail: benjamin.ryan@manchester.ac.uk<mailto:
> benjamin.ryan@manchester.ac.uk>
> ------------------------------------------------------------------
>
>

Re: Query mulitiple cores using intermediate core

Posted by Furkan KAMACI <fu...@gmail.com>.
Which version of Solr do you use?


2013/5/14 Benjamin Ryan <be...@manchester.ac.uk>

> Hi,
>                 I have seen posts etc on how to setup a core that has a
> merged schema and request handlers to enable search across two other cores.
>                 Can anybody give an example of how the request handler in
> the "merged" core is defined so that it will query over the two other
> shards.
>                 This has been explained here (
> http://stackoverflow.com/questions/2139030/search-multiple-solr-cores-and-return-one-result-set)
> but I cannot work how the shard parameter should be specified (in an
> invariant?).
>
> Regards,
>                 Ben
>
> ------------------------------------------------------------------
> Dr Ben Ryan
> Jorum Technical Coordinator (Services)
>
> 5.13 Roscoe Building
> The University of Manchester
> Oxford Road
> Manchester
> M13 9PL
> Tel: 0161 275 0632
> E-mail: benjamin.ryan@manchester.ac.uk<mailto:
> benjamin.ryan@manchester.ac.uk>
> ------------------------------------------------------------------
>
>