i have been trying to get this to work for a while now. my controller
is
sort = [ Ferret::Search::SortField::SCORE_REV ]
@results = Record.multi_search(params[:search_terms], [ Link, Post,
Event ], {:limit => :all, :sort => sort })
and in my view i just render a conglomeration of the appropriate
partials for each model. it seems that no matter what i do, i can't get
the results to be ordered by their ferret_score, even though i can
display that score just fine in my views. i'm really confused and
getting frustrated. maybe someone can shed some light on it. thanks!
here is a sample model :
acts_as_ferret :store_class_name => true, :fields => [:title, :body]
and the main view :
<% for r in @results %>
<%= r.ferret_score %>
<p><%= render_partial Inflector.underscore(r.class), r %></p>
<% end %>
Jon
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk