I tried the to reproduce this. However the matches always returns 4 in my case (when using rows=1 and rows=2). In your case the 2 documents on each core do belong to the same group, right?
I did find something else. If I use rows=0 then an error occurs. I think we need to further investigate this. Can you open an issue in Jira? I'm a bit busy today. We can then further look into this in the coming days. Martijn On 2 April 2012 23:00, Young, Cody <cody.yo...@move.com> wrote: > Okay, I've played with this a bit more. Found something interesting: > > When the groups returned do not include results from a core, then the core > is excluded from the count. (I have 1 group, 2 documents per core) > > Example: > > > http://localhost:8983/solr/core0/select/?q=*:*&shards=localhost:8983/solr/core0,localhost:8983/solr/core1&group=true&group.field=group_field&group.limit=10&rows=1 > > <lst name="grouped"> > <lst name="group_field"> > <int name="matches">2</int> > > Then, just by changing rows=2 > > > http://localhost:8983/solr/core0/select/?q=*:*&shards=localhost:8983/solr/core0,localhost:8983/solr/core1&group=true&group.field=group_field&group.limit=10&rows=2 > > <lst name="grouped"> > <lst name="group_field"> > <int name="matches">4</int> > > Let me know if you have any luck reproducing. > > Thanks, > Cody > > -----Original Message----- > From: martijn.is.h...@gmail.com [mailto:martijn.is.h...@gmail.com] On > Behalf Of Martijn v Groningen > Sent: Monday, April 02, 2012 1:48 PM > To: solr-user@lucene.apache.org > Subject: Re: Distributed grouping issue > > > > > All documents of a group exist on a single shard, there are no > > cross-shard groups. > > > You only have to partition documents by group when the groupCount and some > other features need to be accurate. For the "matches" this is not > necessary. The matches are summed up during merging the shared responses. > > I can't reproduce the error you are describing on a small local setup I > have here. I have two Solr cores with a simple schema. Each core has 3 > documents. When grouping the matches element returns 6. I'm running on a > trunk that I have updated 30 minutes ago. Can you try to isolate the > problem by testing with a small subset of your data? > > Martijn > -- Met vriendelijke groet, Martijn van Groningen