lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: [Solrj 4.0] No group response
Date Fri, 30 Nov 2012 20:42:26 GMT

:         query.setParam(GroupParams.GROUP_MAIN, true);
:         GroupResponse groupResponse = response.getGroupResponse(); // null
: Search result is ok, QueryResponse contains docs I searched for. But group
: response is always null. Did I miss something, some magic parameter for
: enabling group response?

By using GROUP_MAIN = true, you've told the grouping code you wnat it to 
flatten the grouping results and return them in the format of a single 
DocList result -- so there is no GroupResponse included...

"We can optionally use the results of a group command as the "main" result 
(i.e. a single flat document list that would normally be produced by a 
non-grouped query request) by adding the parameter group.main=true. 
Although this result format does not have as much information, it may be 
easier for existing solr clients to parse."

If you want the "rich" grouping response, you need to use 


View raw message