[英]Solr Cloud Document Routing
Currently I have a zookeeper multi solr server, single shard setup. 目前我有一个zookeeper多solr服务器,单个分片设置。 Unique ids are generated automatically by solr.
solr会自动生成唯一ID。
I now have a zookeeper mult solr server, multi shard requirement. 我现在有一个zookeeper多solr服务器,多个分片要求。 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. 阅读http://searchhub.org/2013/06/13/solr-cloud-document-routing/后,我担心如果我想将更新路由到特定分片,我不能允许solr生成随机唯一ID。
Cannot anyone confirm this for me and perhaps give an explanation of the best approach. 任何人都不能为我证实这一点,也许可以解释最好的方法。
Thanks 谢谢
There is no way you can route your documents to a particular shard since it is being managed by the zookeeper. 由于它是由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. 这样,您可以根据需要分离索引。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.