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.
更多推荐
发布评论