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 Le...@gfi.ihk.de on 2012/08/23 16:40:57 UTC

Solr4 BETA "group.ngroups" count

Hello,

I have a problem using grouped queries and the 'group.ngroups' parameter.
When I run the following request

<myURL>/select?q=<myQuery>&group=true&group.field=personId&group.ngroups=true&wt=xml

the response looks like this:

<lst name="grouped">
  <lst name="personId">
    <int name="matches">11</int>
    <int name="ngroups">6</int>
    <arr name="groups">
      <lst>
        <str name="groupValue">106.12345</str>
        <result name="doclist" numFound="3" start="0">...</result>
      </lst>
      <lst>
        <str name="groupValue">106.12312</str>
        <result name="doclist" numFound="3" start="0">...</result>
      </lst>
      <lst>
        <str name="groupValue">101.12313</str>
        <result name="doclist" numFound="2" start="0" maxScore=
"0.08318384">...</result>
      </lst>
      <lst>
        <str name="groupValue">101.12312</str>
        <result name="doclist" numFound="3" start="0" maxScore=
"0.08318384">...</result>
      </lst>
    </arr>
  </lst>
</lst>

I expected, that the ngroups results in 4, because it is the total count 
of all groups, that match my query.

The result of 'matches' is right, and the 11 docs are distributed on the 4 
groups of my response, but I have no idea, 
what ngroups is counting in this case.
Can anybody explain to me, what's the meaning of ngroups is?

regards
Norman Lenzner

Re: Solr4 BETA "group.ngroups" count

Posted by Roman SlavĂ­k <sl...@effectiva.cz>.
Hi, did you find where is problem?

Dne 23.8.2012 16:40, Lenzner@gfi.ihk.de napsal(a):
> Hello,
>
> I have a problem using grouped queries and the 'group.ngroups' parameter.
> When I run the following request
>
> <myURL>/select?q=<myQuery>&group=true&group.field=personId&group.ngroups=true&wt=xml
>
> the response looks like this:
>
> <lst name="grouped">
>    <lst name="personId">
>      <int name="matches">11</int>
>      <int name="ngroups">6</int>
>      <arr name="groups">
>        <lst>
>          <str name="groupValue">106.12345</str>
>          <result name="doclist" numFound="3" start="0">...</result>
>        </lst>
>        <lst>
>          <str name="groupValue">106.12312</str>
>          <result name="doclist" numFound="3" start="0">...</result>
>        </lst>
>        <lst>
>          <str name="groupValue">101.12313</str>
>          <result name="doclist" numFound="2" start="0" maxScore=
> "0.08318384">...</result>
>        </lst>
>        <lst>
>          <str name="groupValue">101.12312</str>
>          <result name="doclist" numFound="3" start="0" maxScore=
> "0.08318384">...</result>
>        </lst>
>      </arr>
>    </lst>
> </lst>
>
> I expected, that the ngroups results in 4, because it is the total count
> of all groups, that match my query.
>
> The result of 'matches' is right, and the 11 docs are distributed on the 4
> groups of my response, but I have no idea,
> what ngroups is counting in this case.
> Can anybody explain to me, what's the meaning of ngroups is?
>
> regards
> Norman Lenzner