OK so to restate, you expect the sort specified to be applied to both the “outer” and “inner” queries. Makes sense, seems like a good enhancement.
Hmm, I wonder if you can put the sort parameter in with the rerank specification, like: q={!rerank reRankQuery=$rqq reRankDocs=1200 reRankWeight=3 sort="score desc, downloads desc”} That doesn’t address your initial point, just curious if it’d do as a workaround meanwhile. Best, Erick > On Sep 26, 2019, at 10:54 AM, Alessandro Benedetti <a.benede...@sease.io> > wrote: > > In the first OK scenario, the search results are sorted with score desc, > and when the score is identical, the secondary sort field is applied. > > In the KO scenario, only score desc is taken into consideration(the > reranked score) , the secondary sort by the sort field is ignored. > > I suspect an intuitive expected result would be to have the same behaviour > that happens with no reranking, so: > 1) sort of the final results by reranked score desc > 2) when identical raranked score, sort by secondat sort field > > Is it clearer? > Any wrong assumption? > > > On Thu, 26 Sep 2019, 14:34 Erick Erickson, <erickerick...@gmail.com> wrote: > >> Hmmm, can we see a bit of sample output? I always have to read this >> backwards, the outer query results are sent to the inner query, so my >> _guess_ is that the sort is applied to the “q=*:*” and then the top 1,200 >> are sorted by score by the rerank. But then I’m often confused about this. >> >> Erick >> >>> On Sep 25, 2019, at 5:47 PM, Alessandro Benedetti <a.benede...@sease.io> >> wrote: >>> >>> Hi all, >>> I was playing a bit with the reranking capability and I discovered that: >>> >>> *Sort by score, then by secondary field -> OK* >>> http://localhost:8983/solr/books/select?q=vegeta ssj&*sort=score >>> desc,downloads desc*&fl=id,title,score,downloads >>> >>> *ReRank, Sort by score, then by secondary field -> KO* >>> http://localhost:8983/solr/books/select?q=*:*&rq={!rerank >> reRankQuery=$rqq >>> reRankDocs=1200 reRankWeight=3}&rqq=(vegeta ssj)&*sort=score >> desc,downloads >>> desc*&fl=id,title,score,downloads >>> >>> Is this intended? It sounds counter-intuitive to me and I wanted to check >>> before opening a Jira issue >>> Tested on 8.1.1 but it should be in master as well. >>> >>> Regards >>> -------------------------- >>> Alessandro Benedetti >>> Search Consultant, R&D Software Engineer, Director >>> www.sease.io >> >>