Solr Facetting-显示前10个结果和其他 [英] Solr Facetting - Showing First 10 results and Other
问题描述
我正在Solr中实现一个解决方案,该方面具有很多价值.
与要在页面的侧面显示一长串值(构面)相反,我要显示前十个.另外还有一个.
例如,我要谈谈国籍.
因此,我不想列出每个国籍,也不希望有查看全部"按钮.
我需要的是排名前10位的国籍,然后是其他".
当用户单击其他按钮时,它是否在此方面?
在Solr中这很容易.您要做的就是添加
& facet.limit = 10
例如
http://solrserver:8080/solr/select&version=2.2&q=solr&start=0&rows=0&indent=on&facet=on&facet.field= nationality&facet.limit=10
根据您的请求,您应该可以限制结果.
有关更多信息,您可以查看我关于Solr方面的博客文章:
http://www.craftyfella.com/2010/01/faceting-and-multifaceting-syntax-in.html
或此处的solr Wiki:
http://wiki.apache.org/solr/SimpleFacetParameters#facet.limit
I am implementing a solution in Solr where I have a lot of values in my facet.
As opposed to displaying a long list of values(facets) down the side of my page I want to display the top 10. And also have one for other.
For instance I would be faceting on Nationality.
So, I do not want to have a list of every nationality, Nor do I want a "see all" button.
What I require is the top 10 nationalitys and then "Other".
When a user clicks on other, it facets on this?
This is quite easy in Solr.. All you need to do is add a
&facet.limit=10
e.g.
http://solrserver:8080/solr/select&version=2.2&q=solr&start=0&rows=0&indent=on&facet=on&facet.field= nationality&facet.limit=10
to your request and you should be able to limit the results.
For more information you can check out my blog post on faceting in solr:
http://www.craftyfella.com/2010/01/faceting-and-multifaceting-syntax-in.html
or the solr wiki here:
http://wiki.apache.org/solr/SimpleFacetParameters#facet.limit
这篇关于Solr Facetting-显示前10个结果和其他的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!