search for: ferret_date_regist

Displaying 2 results from an estimated 2 matches for "ferret_date_regist".

2006 Jul 19
4
sorting and pagination
Hello All, Okay i think I''m finally getting all of what i want out of ferret working, thanks mostly to reading this forum and also getting ALOT of questions answered, thanks alot everyone. Anyway my last ferret task is too get the results sorted by a field called date_registered and have this working with pagination. here is what i''m doing at the moment:
2006 Aug 20
1
sorting with booleans
...def true.<=>(o) !o ? 1 : 0 end I''m using the acts_as_ferret plugin. below is the relevent code that i''m currently using. sort_fields = [] sort_fields << Ferret::Search::SortField.new("sponsorerd") sort_fields << Ferret::Search::SortField.new("ferret_date_registered", :reverse => :true) results = VoObject.find_by_contents(query,:first_doc=>page, :num_docs=> 20,:sort =>sort_fields) Thanks in advance for any replies. regards c -- Posted via http://www.ruby-forum.com/.