当我在solr中使用构面限制时,如何按排序顺序获得结果? [英] How to get results in sorted order when I use facet limit in solr?

查看:127
本文介绍了当我在solr中使用构面限制时,如何按排序顺序获得结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常,带有facetting选项的solr查询会根据facet计数按排序顺序返回结果.当我将构面限制设置为-1时,结果未按排序顺序返回;这意味着我必须在服务器端手动进行排序.

Usually a solr query with facetting option returns the results in sorted order based on the facet count. When I set the facet limit to -1 the results were not returned in sorted order; this means I have to do the sorting manually in the server side.

我是否需要在solr查询中添加更多内容以按排序顺序获取它?

Should I need to append anything more in the solr query to get it in a sorted order?

推荐答案

请尝试 facet.sort = count

默认构面顺序基于计数,降序,但是如果facet.limit小于0,它将返回索引顺序而不是计数desc顺序

The default facet order is base on the count, descending order, but it will return the index order rather than count desc order if facet.limit is less than 0

详细信息可以从 Solr Wiki

这篇关于当我在solr中使用构面限制时,如何按排序顺序获得结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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