如何在solr中按计数对组进行排序 [英] how to order groups by count in solr

查看:34
本文介绍了如何在solr中按计数对组进行排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何在 Solr 结果中对组进行排序.我想按 numFound 对组进行排序.我看到了如何按分数对组进行排序 在这里,但这在我所查看的示例中似乎并没有真正产生影响,这也不是我想要的.

I'm wondering how to order groups in a Solr result. I want to order the groups by numFound. I saw how to order the groups by score here, but that didn't seem to actually make a difference in the examples I looked at, and isn't exactly what I wanted.

在 xml 中,您可以看到每组的数量为 numFound,这就是我想要对组进行排序的依据,例如,我可以在顶部看到最大的组.

In the xml you can see the number per group as numFound and that is what I want to sort the groups by, so for example I could see the largest group at the top.

<arr name="groups">
<lst>
<str name="groupValue">top secret</str>
<result name="doclist" numFound="12" start="0">
...

任何提示表示赞赏!谢谢!

Any tips appreciated! Thanks!

推荐答案

无法对 numFound 进行排序,因为 numFound 不是 Solr 中的字段.
检查提到它的讨论没有得到支持,我也没有找到针对该问题的 JIRA.

Sorting on the numFound is not possible as numFound is not an field in Solr.
Check the discussion mentioning it not being supported and I did not find a JIRA open for the issue as well.

这篇关于如何在solr中按计数对组进行排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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