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

查看:155
本文介绍了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.

推荐答案

您可以使用构面来检索前X个单词,如下所示:

You could use a facet for retrieving the Top X words like this:

http://yourservergoeshere/solr/select?q=*&wt=xml&indent=true&facet=true&facet.query=*&facet.field=message&facet.limit=10&facet.minCount=1

facet.field的值取决于您要搜索的字段.使用facet.limit可以(显然)将结果数量限制为10.您将在结果末尾找到facet结果,以"facet_counts"开头

The value of facet.field depends on the field you like to search in. With facet.limit you'll (obviously) limit the amount of results to 10. You'll find the facet results at the end of the results, starting with "facet_counts"

我真的应该早点睡觉.我没有在您的问题中看到搜索最多的"字样.抱歉.

I really should go to bed earlier. I didn't see the "most searched" in your question. Sorry for that.

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

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