Solr 在不同分片上进行分布式搜索 +在不同的机器上
我正在尝试实现分布式 Solr 搜索(仅需要使用 Solr 3.4),其中索引分布在多台机器上。 这里的分片是指包含索引的分片文件夹,solr 核心已配置为在该索引上进行搜索。它在参数映射中配置,不存在于 solrconfig.xml 文件中。所以每台机器都会有不同名称的分片文件夹。
例如:
主机1:端口1->分片=分片1,
主机2:端口2 - >分片=分片2,
主机3:端口3 - >分片=分片3。
每台机器上的分片名称可能会动态更改。所以不能在任何xml中配置。在查询中使用“shards”参数:host:port/baseURL 不能帮助我指定该特定机器的分片名称。
有没有办法在查询中配置此分片名称:主机名映射?如果没有,有人可以让我知道解决这个问题的最佳方法是什么吗?
I am trying to implement distributed Solr search (need to use Solr 3.4 only) where the index is distributed on multiple machines.
By shard here, I mean a shard folder containing the index, that the solr core has been configured to search on. It is configured in a parameters map and is not present in the solrconfig.xml file. So each machine will have different names of the shard folder.
For example:
host1:port1 -> shard=shard1,
host2:port2 -> shard=shard2,
host3:port3 -> shard=shard3.
The shard names on each machine are subject to change dynamically. So it cannot be configured in any xml. Using the "shards" param in the query: host:port/baseURL doesnt help me specify the shard name for that specific machine.
Is there a way to configure this shard name:host name mapping in the query? If not, could someone please let me know what would be the best approach to solve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我正确理解您的问题,我认为您应该能够在查询本身中指定分片名称。
就像 -
http://host1:port1/solr/shard1/select?shards=host2:port2/solr/shard2,host3:port3/solr/shard3&q=ipod+solr
例如
http://localhost:8983/solr/shard1/select?shards=localhost:8984/solr/shard2,localhost:8985/solr/shard3&q=ipod+solr
If i understood your issue correctly, I think You should be able to specify the shard names in the query itself.
Like -
http://host1:port1/solr/shard1/select?shards=host2:port2/solr/shard2,host3:port3/solr/shard3&q=ipod+solr
e.g.
http://localhost:8983/solr/shard1/select?shards=localhost:8984/solr/shard2,localhost:8985/solr/shard3&q=ipod+solr