0

Currently I have a zookeeper instance controlling replication on 3 physical servers. It is the solr integrated zookeeper. 1 shard, 1 collection.

I have a new requirement in which I will need a new static solr instance (1 new collection, no replication). Same schema as previous collection. A copy of this instance will also be placed on the 3 physical servers mentioned above. A caveat is that I need to perform distributed searches across the 2 collections and have the results blended.

Thanks to javacreed I now know that sharding is not in my solution. Previous questions answers here and here.

In my current setup I run the following command on the server running zookeeper -

java -Dbootstrap_confdir=solr/myApp/conf -Dcollection.configName=myConfig -DzkRun -DnumShards=1 -jar start.jar

Am I correct in saying that this will not change and I will now also manually start the non replicated collection. I really only need to change my search queries to include the 'collection' parameter? Something like -

http://localhost:8983/solr/collection1/select?collection=collection1,collection2

This example is from Solr documentation. I am slightly confused as to whether it should be ...solr/collection1/select?... or ...solr/collection2/select?... or if it even matters?

Thanks

Community
  • 1
  • 1
Stewart Megaw
  • 311
  • 2
  • 14
  • I may be mistaken, but I think you're confusing Solr "Cores" with Solr (sharded) "Collections". In Solr the notion of Core is independent of Sharding, it simply represents one Lucene Index managed by (via) Solr. To access a given Core via Solr HTTP APIs, you use http://solr_address:port/solr_root_url/core_name/select?q=*:* On the other hand if a Core is sharded, then you have multiple collections on it (one for each shard). At this point, you can do http://solr_address:port/solr_root_url/core_name/select?q=*:*?collection=collection1 – Shivan Dragon Apr 18 '14 at 07:32

1 Answers1

1

Thanks for your kind word stewart.You can search it directly on solr as

http://localhost:8983/solr/select?collection=collection1,collection2

There is no need to mention any collection path since you are defining them in the collection parameters.

javacreed
  • 958
  • 1
  • 8
  • 20