搜索多个 SOLR 核心并返回一个结果集 [英] Search multiple SOLR core's and return one result set

查看:21
本文介绍了搜索多个 SOLR 核心并返回一个结果集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在 SOLR 中设置了多个核心,并希望在这些核心中进行搜索并返回单个结果集.

We have several core's setup in SOLR and would like to search across these cores and return a single result set.

多一点背景:我们有一个 SOLR 核心,可以为我们的内部博客引擎编制索引.我们还有一个 SOLR 核心,用于索引我们的 CMS 系统.我们希望搜索这两个核心,但查看单个结果集.

A bit more background: We have a SOLR core that we index our internal blog engine. We also have a SOLR core that we index our CMS system. We would like to search across both of these cores but view a single result set.

我知道文档中有相关实体,但我们希望将核心分开,以便于维护和冗余.

I am aware of having related entities in a document, but we would like to keep the cores separate, for easy of maintenance, and redundancy.

我们使用 SolrSharp 作为搜索 SOLR 的包装器.任何建议或方向将不胜感激.

We are using SolrSharp as a wrapper for searching SOLR. Any advice or direction would be appreciated.

推荐答案

从 Solr 1.3 开始,Solr 中就有了不错的多核搜索功能.请阅读 Distributed Search 文章,其中解释了如何使用 shards 参数跨多个内核进行查询和将结果作为一个数据集返回.

Since Solr 1.3, there's been decent multi-core search capabilities in Solr. Please read the Distributed Search article where it explains how to use the shards parameter to query across multiple cores and return results as one data set.

这篇关于搜索多个 SOLR 核心并返回一个结果集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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