Search across multiple cores and get unified result

♀尐吖头ヾ 提交于 2019-12-13 01:03:47

问题


I have 2 cores on a single solr instance. Schema's of both cores share same primary key. I want to merge results of a query from both the cores. Is it possible using solr?

I followed Solr:Distributed Search however the example didnt work for me ( I did get result but it was not unified) . I queried solr cores using :

localhost:8983/solr/core1/select/?shards=localhost:8983/solr/core1,localhost:8983/solr/core0&q=123_456.

Has anyone tried this approach before?


回答1:


What do you mean by Unified results ??
You should be able to get a combined results from both the Cores in a single result set.
However, there are few limitations.
The schema needs to same for both the cores or has been synced up so that the search happens on the same fields and are returned accordingly.

What do mean cores share same primary key ?
The Id needs to be unique across cores.

The unique key field must be unique across all shards. If docs with duplicate unique keys are encountered, Solr will make an attempt to return valid results, but the behavior may be non-deterministic.



来源:https://stackoverflow.com/questions/11679665/search-across-multiple-cores-and-get-unified-result

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