Hi Pat, I am facing this issue for negative integers. When sorting with :sort_mode => :desc, negative ints come first.
> > On 11/03/2009, at 12:37 AM, Martin wrote: > > > > > Hi > > I like to order a search request by an integer field. But when I do so > > the order (comments_count) is 1, 11, 2 and not 1, 2, 11. How can I > > define the index that the field can be ordered like an integer and not > > a string? > > > My articles model right now: > > define_index do > > indexes title, :sortable => true > > indexes comments_count, :as => :comments, :sortable => true > > end --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en -~----------~----~----~----~------~----~------~--~---
