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

Reply via email to