You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by mani arasu <re...@gmail.com> on 2013/03/06 07:26:43 UTC

Returning the number of documents in solr when result set is grouped and the group is limited - Reg.

Consider, we use Field-Collapsing/Grouping with parameters,

   - group=true
   - group.limit=n


The response for such a query will have the fields,

   - *matches* (indicating the grand total of the number of documents that
   matches the given query in all the groups)
   - *numFound* (indicating the number of documents that matches the given
   query in a particular group)


But, the* number of documents that are actually qualified to be returned in
response*, due to the limitation specified on group.limit, is *not available
* in the response.
It could be a "Good to have" feature in forthcoming releases.

A discussion in Stackoverflow regarding the same is available at:
http://stackoverflow.com/questions/15229345/returning-the-number-of-documents-in-solr-when-result-set-is-grouped-and-the-gro/15239565#15239565

Comments?