sort=score desc, priority desc Won't that do it?
Upayavira On Mon, Oct 15, 2012, at 09:14 AM, Sandip Agarwal wrote: > Hi, > > I have many documents indexed into Solr. I am now facing a requirement > where the search results should be returned sorted based on their scores. > In the *case of non-exact matches*, if there is a tie, another level of > sorting is to be applied on a field called priority. > > I am using solr with django-haystack in django 1.4. > > What can/should I do to achieve my requirement? > What I tried: > I have ordered the SearchQuerySet method by('-score', 'priority'), but > this > also applies to exact matches having the same score. What should I try to > achieve the above? > Is it even possible to achieve what I am trying? > > I have even posted a question on StackOverflow: > http://stackoverflow.com/questions/12890165/selective-sorting-in-solr > > Hoping for your guidance. > > -- > Regards, > Sandip Agarwal