lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Group count in SOLR 3.3
Date Fri, 24 Aug 2012 16:09:01 GMT
3.6 has a getNGroups, does that do what you want?

Best
Erick

On Thu, Aug 23, 2012 at 2:23 AM, Roman SlavĂ­k <slavik@effectiva.cz> wrote:
> Hi guys,
>
> we are using SOLR 3.3 with Solrj inside our java project. In actual version
> we had to add some grouping support, so we add parameters into SolrQuery
> object like this:
>
>         query.setParam(GroupParams.GROUP, true);
>         query.setParam(GroupParams.GROUP_MAIN, true);
>         query.setParam(GroupParams.GROUP_FIELD, OUR_GROUP_FIELD);
>
> and we get QueryResponse with results we need. Awesome!
>
> But now I have one remaining problem, I don't know how get number of groups
> from QueryResponse. I found I must add group.ngroups=true param into query.
> So I did it:
>
>        query.setParam(GroupParams.GROUP_TOTAL_COUNT, true);
>
> But QueryResponse seems same. There's no method like "getGroupCount()" or
> group count param in header.
>
> Am I doing something wrong? Or is it SOLR 3.3 problem? If we upgrade to
> newer version, will it works?
>
> Thanks for any advice!
>
> Roman

Mime
View raw message