How to get results in sorted order when I use facet limit in solr?

喜夏-厌秋 提交于 2019-12-11 11:42:11

问题


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.

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


回答1:


please try facet.sort=count

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

Details can be read from Solr Wiki



来源:https://stackoverflow.com/questions/22387102/how-to-get-results-in-sorted-order-when-i-use-facet-limit-in-solr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!