Class: Ferret::Search::Sort
- Inherits:
-
Object
- Object
- Ferret::Search::Sort
- Defined in:
- ext/r_search.c
Overview
Summary
A Sort object is used to combine and apply a list of SortFields. The SortFields are applied in the order they are added to the SortObject.
Example
Here is how you would create a Sort object that sorts first by rating and then by title;
= SortField.new(:rating, :type => :float, :reverse => true)
sf_title = SortField.new(:title, :type => :string)
sort = Sort.new([, sf_title])
Remember that the :type parameter for SortField is set to :auto be default be I strongly recommend you specify a :type value.