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