SOLR计数组(SOLR count of groups)

编程入门 行业动态 更新时间:2024-10-15 22:24:21
SOLR计数组(SOLR count of groups)

http://localhost:8080/solr/select?q=(apposta apposta per) OR (sue prime ore al)&group=true&group.field=grouping_field&group.limit=5

此查询返回2组第一组有1个文档,第二组有2个文档。

作为回应,我看到文件数(3),但没有组数。 我如何得到团体的人数。

http://localhost:8080/solr/select?q=(apposta apposta per) OR (sue prime ore al)&group=true&group.field=grouping_field&group.limit=5

This query returns 2 groups first group has 1 document and second group has 2 documents.

In response I see count of documents(3) but there is no counts of groups. How can I get count of groups.

最满意答案

使用group.ngroups=true来包含响应中的组数。

更多信息@ http://wiki.apache.org/solr/FieldCollapsing

文档 - group.ngroups - true / false 如果为true,则包含与查询匹配的组数。 默认为false。

Use group.ngroups=true to include the number of groups in the response.

More info @ http://wiki.apache.org/solr/FieldCollapsing

Documentation - group.ngroups - true/false If true, includes the number of groups that have matched the query. Default is false.

更多推荐

本文发布于:2023-08-01 05:12:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1354914.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数组   SOLR   groups   count

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!