问题描述
当前,我有一个zookeeper多Solr服务器,单分片设置.唯一的ID由solr自动生成.
Currently I have a zookeeper multi solr server, single shard setup. Unique ids are generated automatically by solr.
我现在有一个Zookeeper多用途solr服务器,需要多分片.我需要能够将更新路由到特定的分片.
I now have a zookeeper mult solr server, multi shard requirement. I need to be able to route updates to a specific shard.
阅读 http://searchhub.org/2013/06之后/13/solr-cloud-document-routing/我担心如果要将更新路由到特定的分片,将无法允许solr生成随机的唯一ID.
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.
谢谢
推荐答案
由于由动物园管理员管理,因此无法将文档路由到特定的分片.
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.
这篇关于Solr Cloud文档路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!