Hi Markus, For ngroups to work in a cloud environment you have to make sure that all docs belonging to a group reside on the same shard. Custom hashing has been introduced in the recent versions of solr cloud. You might want to look into that https://issues.apache.org/jira/browse/SOLR-2592
All queries on SolrCloud are run individually on each shard. And then the results are merged. When u run a group query SolrCloud runs the query on each shard and when the results are merged the ngroups from each shard are added up. This is why the ngroups is incorrect when using SolrCloud. -- Shreejay On Friday, June 14, 2013 at 5:11, Markus.Mirsberger wrote: > Hi, > > I just noticed (after long time testing and finally looking into the > docu :p) that the ngroups parameter does not show the correct number of > groups when used in anything else than a single shard environment (in my > case SolrCloud). > > Is there another way to get the amount of all groups without iterating > through alot of resultsets? > I dont need the values of the grouping. I just need the complete number > of groups. > > Or can this be done with facets maybe? > I dont need to to use grouping but as far as I know I cant get the > complete amount of facets without iterating through the resultsets. > So this seemed to me the only way to achieve something equal to a > distinct count in sql. > > any ideas how this can be done with solr? > > > Thanks, > Markus > >