Hi Pedro,
To sort reverse by score do this;
s = Sort.new(SortField.new("Reverse Score",
{:sort_type => SortField::SortType::SCORE,
:reverse => true}))
Hope that helps.
Dave
On 5/9/06, Pedro C?rte-Real <Pedro.CorteReal at iantt.pt>
wrote:> The docs for Sort.new say:
>
> reverse: pass true if you want the sort order to be reversed. Only works
> if you pass the field names.
>
> Does this mean it''s not possible to do a reverse sort by score? If
it is
> it seems to be broken as I don''t seem to be able to reverse the
order of
> the sort. I''ll write a test case if this is not a known problem.
>
> Greetings,
>
> Pedro.
>
> _______________________________________________
> Ferret-talk mailing list
> Ferret-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ferret-talk
>