Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 329
vladimir Avatar asked Nov 10 '11 12:11

vladimir


1 Answers

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.

like image 147
Jayendra Avatar answered Sep 22 '22 14:09

Jayendra