Reputation: 444
I'm using sunspot_solr
gem. I need to find the student's list in descending order of their points
. If there is a tie, sort them in the descending order of level
.
User.solr_search do
with :role, :student
with :confirmed, true
order_by :points, :desc
order_by :level, :desc
paginate :page => 1, :per_page => 15
end
I am getting the list in the descending order of their points
, but the result does not satisfy the second condition. I've solr indexed all the above fields.
Upvotes: 1
Views: 218