Reputation: 727
Is there any way to get the number of distinct groups in a distributed grouping in solr?
The ngroups param returns the summatory of all groups. If a group exists in more than one shard I will have repeated this groups in the ngroups.
Upvotes: 0
Views: 404
Reputation: 2960
There are a few solutions to this now:
http://yonik.com/solr-count-distinct/
You can use the stats component with pivot faceting, use group with group.facet or use the new analytics API that shipped in 5.2 (5.1. didn't seem to work when I tried it).
Upvotes: 0