You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Dmitri Maziuk <dm...@gmail.com> on 2024/07/18 22:25:11 UTC

num groups in group vs collapse query

Hi all,

a query with `group=true&group.field=Foo&group.ngroups=true` returns 
`"ngroups" : 8`. There are 7 "real" groups and one null group.

Same query with `fq={!collaps field=Foo nullPolicy=expand}` returns 
`"numFound" : 10`. There are 7 "real" groups and 3 null ones.

Is that supposed to happen?

(Using 8.11 single node)

Dima

Re: num groups in group vs collapse query

Posted by Dmitri Maziuk <dm...@gmail.com>.
Oops, sorry, brain fart.

"You know you've been staring at the computer too long when..."

On 7/18/24 17:25, Dmitri Maziuk wrote:
> Hi all,
> 
> a query with `group=true&group.field=Foo&group.ngroups=true` returns 
> `"ngroups" : 8`. There are 7 "real" groups and one null group.
> 
> Same query with `fq={!collaps field=Foo nullPolicy=expand}` returns 
> `"numFound" : 10`. There are 7 "real" groups and 3 null ones.
> 
> Is that supposed to happen?

Of course it is supposed to happen. The query I meant to run was 
"nullPolicy=collapse" and that does return the same group count. D'oh.

Apologies for the noise,
Dima