如何搜索多个SOLR Core? [英] How to Search Multiple SOLR Core?

查看:241
本文介绍了如何搜索多个SOLR Core?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在单Solr实例"中,存在多个核.不涉及碎片,复制和云概念.现在如何在这种情况下搜索多个核心?

In Single Solr Instance, multiple core(s) are there. No Shards, Replication and Cloud concept involved. Now how to search over multiple core in this scenario?

推荐答案

要在内核之间进行搜索,您必须使用分片.如果两个内核的架构相同,则可以查询一个内核并提供shards参数.

To search across cores, you'll have to use sharding. If the schema for both cores are identical, you can just query one core and provide the shards parameter.

如果架构不同,请创建一个单独的核心,该核心具有两个目标架构的合并架构,然后使用两个单独的核心作为分片来查询该核心.在core0中具有FieldA,FieldB和core1中具有FieldB,FieldC的情况下,将需要一个已定义FieldA,FieldB,FieldC的架构,然后需要一个指向core0和core1的碎片参数.

If the schema is different, create a separate core that have a merged schema of both the target schemas, then query that core with the two separate cores as shards. Having FieldA, FieldB in core0 and FieldB, FieldC in core1 would require a schema with FieldA, FieldB, FieldC defined, and then a shards parameter that points to core0 and core1.

此方法的主要问题是,如果文档之间存在很大差异,则它们之间的评分可能会有些奇怪,因为将core0中的内容与core1中的内容进行比较可能很奇怪.

The primary issue with this approach is that if the documents are very different, scoring between them might be a bit weird, as comparing something from core0 with something from core1 can be strange.

共享还假定文档平均分配(因为分数是在每个核心上本地计算的).

Sharding also assumes that the documents are distributed evenly (as the scores are calculated locally on each core).

这篇关于如何搜索多个SOLR Core?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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