2

Currently I have a zookeeper multi solr server, single shard setup. Unique ids are generated automatically by solr.

I now have a zookeeper mult solr server, multi shard requirement. I need to be able to route updates to a specific shard.

After reading http://searchhub.org/2013/06/13/solr-cloud-document-routing/ I am concerned that I cannot allow solr to generate random unique ids if I want to route updates to a specific shard.

Cannot anyone confirm this for me and perhaps give an explanation of the best approach.

Thanks

Stewart Megaw
  • 311
  • 2
  • 14

1 Answers1

1

There is no way you can route your documents to a particular shard since it is being managed by the zookeeper.

Solution to your problem is that you should create two collections instead of two shards. Use your 1st collection with two servers and 2nd collection can use the third server and then you can send your updates to particular servers.The design should look like

collection1---->shard1---->server1,server2
collection2---->shard1----->server3

This way you can separate your indexes as per your requirement.

javacreed
  • 958
  • 1
  • 8
  • 20
  • The problem with this is that I need a distributed search. I need the results from both shards merged based upon the solr scoring algorithm. What is the information in the link I provided referring to if not a way to update a specific shard? – Stewart Megaw Apr 17 '14 at 11:47
  • You can send updates to a particular collection but retieve from both in one go. – javacreed Apr 17 '14 at 11:51
  • I have now went round in a circle and think I know what I need - 1 shard, 2 collections! Thankyou. I see people are asking the the question [link](http://lucene.472066.n3.nabble.com/Compatible-collections-SOLR4-SOLRCloud-td4063776.html) and nobody has a formal answer apart from 'the schema should be similar'. Anyway I have posted one last question for my dilemma (I hope!) - http://stackoverflow.com/questions/23148464/solr-cloud-distributed-search-on-collections – Stewart Megaw Apr 18 '14 at 06:14
  • Hi javacreed perhaps you could take a look at my **[new solr question here](http://stackoverflow.com/questions/23338324/zookeeper-multiple-collection-different-schema)**. It's connected to the previous 3 questions you answered. Thanks – Stewart Megaw Apr 29 '14 at 03:36