Re: Sort with subquery

2017-11-28 Thread Mikhail Khludnev
No way. Subquery processes a cropped page of docs sorted before. Giving the subquery, you can use {!join score=Max ...}... see http://blog-archive.griddynamics.com/2015/08/scoring-join-party-in-solr-53.html On Tue, Nov 28, 2017 at 12:39 AM, Jinyi Lu wrote: > Hi all, > > I have a question about

Re: Sort with subquery

2017-11-27 Thread Erick Erickson
No. You're missing the point that [subquery] is called when assembling the return packet, which consists of only the top N docs from your query against the static collection, _not_ as part of the search which it would have to be to do what you want. To sort the complete result set, you have to ask

Re: Sort with subquery

2017-11-27 Thread Jinyi Lu
Thank you for the reply! In terms of sort, I am wondering is it possible to sort the docs from my static collection based on the corresponding counts in the dynamic collection, since we have combined them together in the result. Something like: sort=max(status.cnt) asc Or is it possible to add

Re: Sort with subquery

2017-11-27 Thread Erick Erickson
I'm not quite sure what "sort the results" means here. The [subquery] bit just adds a field to the output of the top N. So what you'd be doing here is just getting the top 10 (if &rows=10) from your static collection, then adding the counts to them from the "dynamic" collection. So the sort here yo

Sort with subquery

2017-11-27 Thread Jinyi Lu
Hi all, I have a question about how to sort results based on the fields in the subquery. It’s exactly same as this question posted on the stackoverflow https://stackoverflow.com/questions/47127478/solr-how-to-sort-based-on-subquery but no answer yet. Basically, I have two collections: 1. S