Solr - 最常见的搜索词 [英] Solr - most frequent searched words

查看:23
本文介绍了Solr - 最常见的搜索词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试组织一个 solr 搜索引擎.我已经设置了拼写错误系统和建议.

I'm trying to organize a solr search engine. I've already set up the misspelling system and the suggestions.

但是我似乎无法找到如何检索 solr/lucene 中搜索最多的前 10 个单词/术语/关键字.我怎样才能得到这个?我想在我的主页上显示这些.

However I can't seem to find how to retrieve the top 10 most searched words/terms/keywords in solr/lucene. How can I get this? I want to display those on my homepage.

推荐答案

Solr 不提供这种开箱即用的功能.有 StatsComponent,它为您提供各种统计信息,但所有这些都只是数字.

Solr does not provide this kind of feature out of the box. There is the StatsComponent, that provides you with all kind of statistics, but all of those are numeric only.

根据您访问 solr 的方式(直接或通过您自己的应用程序),您可以拦截所有调用并记录查询字符串.我在最近的一个项目中做到了这一点,我在其中记录了对数据库的查询.如果您将所有关键字提交到您的 solr 服务器上的其他核心,您可以按照 Hyque 的描述对您的搜索字词进行分面查询

Depending on how you access solr (directly or via your own app) you could intercept all calls an log the query string. I did this in a recent project where I logged a queries to a database. If you submit all keywords to an other core on your solr server, you can faceting queries on your search terms as described by Hyque

这篇关于Solr - 最常见的搜索词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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