Let me copy paste an answer I wrote yesterday :)

To get the number of groups, you are expected to set
set group.ngroups=true.
Even then, the result will only give you an upperbound
in a distributed environment.
To get the exact number of groups, you need to shard along
your grouping field.

If you have many groups, you may also experience a huge performance
hit, as the current implementation has been heaviy optimized for low
number of groups (e.g. e-commerce categories).



On Thu, Aug 1, 2013 at 10:06 AM, Bruno René Santos <brunor...@gmail.com>wrote:

> Hello,
>
> Is there any way to know how many items will I have after grouping results?
> I have the total matches without groups and for each group the quantity of
> items on it, but I cannot find the number of groups I got.
>
> Regards
>
> --
> Bruno René Santos
> Lisboa - Portugal
>



-- 
______________________________________________

 Masurel Paul
 e-mail: paul.masu...@gmail.com

Reply via email to