Hi Pat, hydrozen wrote: > I read everywhere that string attributes are automatically converted > to integers so that sorting can work on those attributes... but if > somehow I could know what the integer value of "en" and "fr" is, could > I be able to filter by that column in my :with clause? > > I also tried indexing the locale column using something like this : > has "CRC32(feature_translation.locale)", :type => :integer, :as > => :t_locale > so that the locale field is indexed as an integer, but since I'm using > postgresql it gives me an error about the field not being in the > group_by clause.
Have a read of this thread from a few days ago: http://groups.google.com/group/thinking-sphinx/browse_thread/thread/8b93dc03d95e66a1 Maybe something like: has "CASE locale WHEN 'en' THEN 1 ELSE 2 END", :as => locale -- James Healy <jimmy-at-deefa-dot-com> Fri, 01 May 2009 14:12:05 +1000 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
