Hello everybody!
I am trying to sort my search results by date, and then each day by
score.
For example:
– 26 May
- Score 0.74
- Score 0.55
– 25 May
- Score 0.93
- Score 0.68
- Score 0.41
I tried creating an array like this
sortable_fields = []
sortable_fields << Ferret::Search::SortField.new(:created_at_sort,
:reverse => true)
sortable_fields << Ferret::Search::SortField::SCORE
but it only works sorting by the first element (in both cases).
Any ideas?
Have a nice a day!