Solr 云文档路由 [英] Solr Cloud Document Routing

查看:30
本文介绍了Solr 云文档路由的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我有一个 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.

谢谢

推荐答案

您无法将文档路由到特定分片,因为它由 Zookeeper 管理.

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 云文档路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆