The field I am grouping on is a single-valued string. It looks like in non-distributed mode if I use group=true, sort, group.sort, and group.limit=1, it will..
- group the results - sort with in each group - limit down to 1 result per group - apply the sort between groups using the single result of each group When I run with numShards >= 1... - group the results - apply the sort between groups using the document from each group based on the sort, for example if sort= popularity desc then it uses the highest popularity from each group - sort with in the group - limit down to 1 result per group I was trying to confirm if this was the expected behavior, or if there is something I could do to get the first behavior in a distributed configuration. I posted this a few days ago describing the scenario in more detail if you are interested... http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201306.mbox/%3CCALo_M18WVoLKvepJMu0wXk_x2H8cv3UaX9RQYtEh4-mksQHLBA%40mail.gmail.com%3E > What type of field are you grouping on? What happens when you distribute > ?it? I.e. what specifically goes wrong? > Upayavira On Tue, Jun 25, 2013, at 09:12 PM, Bryan Bende wrote: > I was reading this documentation on Result Grouping... > http://docs.lucidworks.com/display/solr/Result+Grouping > > which says... > > sort - sortspec - Specifies how Solr sorts the groups relative to each > other. For example, sort=popularity desc will cause the groups to be > sorted > according to the highest popularity document in each group. The default > value is score desc. > > group.sort - sort.spec - Specifies how Solr sorts documents within a > single > group. The default value is score desc. > > Is it possible to use these parameters such that group.sort would first > sort with in each group, and then the overall sort would be applied > according to the first element of each sorted group ? > > For example, using the scenario above where it has "sort=popularity > desc", > could you also have "group.sort=date asc" resulting in the the most > recent > document of each group being sorted by decreasing popularity ? > > It seems to work the way I described when running a single node Solr 4.3 > instance, but in a 2 shard configuration it appears to work differently. > > -Bryan