I am trying to figure out how to sort my results by the score Ferret is returning. From the results of a search, I use the ids to then look up their corresponding records in the database. The reason for this is that the database records contain more information than I am storing in the index. Any ideas? Code example below. Thanks in advance! def index if (params[:q]) @search_results = Array.new index = FerretConfig::INDEX index.search_each(params[:q]) do |doc, score| @search_results << index[doc][:id] end @quotes = Quote.find(@search_results) end end -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---