How to Search Multiple SOLR Core?

二次信任 提交于 2019-12-07 19:59:28

问题


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?


回答1:


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.

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.

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).



来源:https://stackoverflow.com/questions/39450164/how-to-search-multiple-solr-core

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!