Solr:从外部数据源检索未存储的字段 [英] Solr: Retrieve non-stored fields from external data source

查看:117
本文介绍了Solr:从外部数据源检索未存储的字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在从事一个项目,我想在该项目中将多个数据源(Oracle和HBase)索引到Solr中以进行全文搜索.另外,我希望能够可视化我索引到Solr中的数据.我仍在评估是否为此使用香蕉或色相.

I'm currently working on a project on which I would like to index several data sources (Oracle and HBase) into Solr for full text search. Additionally, I want to be able to visualize the data I index into Solr. I'm still evaluating on whether to use Banana or Hue for this.

问题来了:据我了解的Solr文档,我只能搜索已索引但未存储的字段,而无法检索其原始内容.我想这将使可视化人员很难为我生成一些漂亮的,带有标签的图;)

Here comes the problem: As far as I understood the Solr docs, I can only search on indexed, but non-stored, fields, but not retrieve their original contents. I suppose this will make it quite difficult for the visualizers to produce some nice, labeled graphs for me ;)

我真的想避免存储字段,因为实际数据最终可能会变得非常大,并且已经存储在另一个数据库中.是否有一些插件(也许是另一个SearchHandler?),可以从外部数据源检索匹配的数据字段,以便将它们与搜索结果一起提供?如果没有,那么实现这种功能的最佳地点在哪里? Solr SearchHandler?香蕉/色调?

I would really like to avoid storing the fields as the actual data could grow quite big eventually and it is already stored inside another database. Is there some plugin (another SearchHandler, maybe?), which is able to retrieve the matching datafields from an external datasource to be able to deliver them together with the search results? If not, where would be the best place to implement such a functionaliy? A Solr SearchHandler? Banana/Hue?

非常感谢您的任何建议! :)

Thank you very much in advance for any suggestions! :)

推荐答案

恕我直言,实现此类功能的最佳方法是返回香蕉兼容"响应的SearchHandler.您应该为需要搜索的字段编制索引,而不必将其存储在Solr中.搜索处理程序应根据搜索结果从HBase检索相应的行,这将在Banana中启用带标签的数据.在单独的过程中,还必须在添加,更新HBase数据时定期维护索引.第一个用例

IMHO, the best way to implement such functionality is as a SearchHandler that returns Banana "compatible" response. You should index the fields that you need to be searchable without storing them in Solr. The search handler should retrieve corresponding rows from HBase according to search results which would enable labeled data in Banana. In a separate process, you also have to maintain the index periodically when HBase data are added, updated, etc. The first use case here is very similar to yours.

这篇关于Solr:从外部数据源检索未存储的字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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