lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martijn van Groningen (Commented) (JIRA)" <>
Subject [jira] [Commented] (SOLR-2817) Search result with grouping activated delivers wrong numFound value and breaks pager.
Date Fri, 07 Oct 2011 08:34:29 GMT


Martijn van Groningen commented on SOLR-2817:

Hi Bronco, this is not a bug. It is just how grouping works. If you want a grouped total count
you need to use:

This will add the number of groups to your result, together with the number of matches (numFound).
The catch is that when you use group.main=true that this information is not returned to the
client (although the group count is computed). The group.main=true returns the normal response
to be compatible with clients that don't understand the grouped response, the price you pay
is that you don't have access to grouped related information. The numFound has always returned
the number of documents found, not the number of groups found. I believe for that reason the
numFound represents the number of matches and not number of documents.

I think the best way to fix this is let the Drupal plugin parse the grouped response (which
the default when using grouping). It is very likely that in the future more grouped related
information is added to the grouped response, which is not available in the normal response.

> Search result with grouping activated delivers wrong numFound value and breaks pager.
> -------------------------------------------------------------------------------------
>                 Key: SOLR-2817
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 3.4
>            Reporter: bronco
>            Priority: Blocker
>              Labels: grouping, solr
> I use the 3.4 brach of solr for grouping my results, but obviously there is something
wrong in my eyes. If I activate the grouping functionality I get the expected results. In
my case for example 4 rows, but the the numFound value says it has 26 results. 
> This result is used by the Apache Solr Library in Drupal to calculate the correct pager
on my website. Now I get a search result page with 4 results and a confused pager with 3 more
steps to not existing search pages.
> I try a lot of things including using a facet and all the other suggested things by google
but I couldn't change the numFound value to the correct one in my case.
> If I not use the group.main=true setting including a facet I get in the facet conclusion
the correct values of found results but it also say matches 6 (numFound=6). The Apache Solr
Library make it nesessary to use the group.main=true setting because without this value the
library is not able to parse the resultset. So I get always an empty website without any results
even solr answers correctly.
> Is it somehow possible to change the numFound value to the correct one of the group count
result. I think nobody groups a field and shows maybe 10 entries which belong to the request
and tell the user we have 200 other things which are not interesting you. But I have to tell
> Any help is apreciated to get some understanding why solr delivers me this numFound result
and how to fix this issue.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message