Reputation: 6357
I am using Result Grouping into the SOLR. How can i get the total number of results? By result I mean the count of grouped data.
For example:
I searched with 2 email addresses ("[email protected]" OR "[email protected]"). I got 2 results in the result set. There is numFound attribute in the result node which shows the email address "[email protected]" matched 16 times and the email address "[email protected]" matched 28 times. There is a matches attribute which shows the total number of matches (16 + 28 = 44). But i want to know the total number of result set which is 2 (1 for "[email protected]" + 1 for "[email protected]"). How can i get that?
Upvotes: 2
Views: 2914
Reputation: 52779
For the number of groups use the groups.ngroups
request parameter which will give you the group count.
group.ngroups
true/false
If true, includes the number of groups that have matched the query. Default is false.
Upvotes: 7