Re: Grouped Result sort issue

2017-04-13 Thread alessandro.benedetti
I had the chance to make some investigation code side, and I basically confirm what Erick hypothesized and what Diego Ceccarelli mentioned in this other thread [1]. Grouping happens with a 2 collector phases strategy : 1) first phase retrieve and sort the groups 2) second phase retrieve the top d

Re: Grouped Result sort issue

2017-04-12 Thread Erick Erickson
Alessandro: I should have been explicit that I'm hypothesizing somewhat here, so believe me at your own risk ;) bq: So it means that group sorting is independent of the group head sorting that's my hypothesis, but it's _not_ based on knowing the code. Best, Erick On Wed, Apr 12, 2017 at 2:05 A

Re: Grouped Result sort issue

2017-04-12 Thread alessandro.benedetti
"You're telling Solr to return the highest scoring doc in each group. However, you're asking to order the _groups_ in ascending score order (i.e. the group with the lowest scoring doc first) of _any_ doc in that group, not just the one(s) returned. These are two separate things. " This is quit

Re: Grouped Result sort issue

2017-04-11 Thread Erick Erickson
Skimming, I don't think this is inconsistent. First I assume that you're OK with the second example, it's this one seems odd to you: sort=score asc group.sort=score desc You're telling Solr to return the highest scoring doc in each group. However, you're asking to order the _groups_ in ascending

Re: Grouped Result sort issue

2017-04-11 Thread Eric Cartman
I modified and cleaned the previous query. As you can see the first query sorting is a bit odd. Using parameters sort=score asc group.sort=score desc http://localhost:8983/solr/mcontent.ph_post/select?=&fl=*,score&group.field=partnerId&group.limit=1&group.main=false&group.ngroups=true&gro

Re: Grouped Result sort issue

2017-04-11 Thread Erick Erickson
the group.sort spec is specified twice in the URL group.sort=score desc& group.sort=score desc Is there a chance that during testing you only changed _one_ of them so you had group.sort=score desc& group.sort=score asc ? I think the last one should win.. Shot in the dark. Best, Erick On Tue,

Re: Grouped Result sort issue

2017-04-11 Thread alessandro.benedetti
To be fair the second result seems consistent with the Solr grouping logic : *First Query results (Suspicious)* 1) group.sort= score desc -> select the group head as you have 1 doc per group( the head will be the top scoring doc per group) 2) sort=score asc -> sort the groups by the score of the h