: 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... https://wiki.apache.org/solr/FieldCollapsing "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 GROUP_MAIN=false. -Hoss