You could just build the SQL snippet yourself - perhaps something like the following? Or use CONCAT (as you've suggested in your subject).
indexes "'foo' + CAST(column AS INT)", :as => :prefixed_column Cheers -- Pat On 03/08/2010, at 4:49 AM, gmoniey wrote: > I have a integer column, which I want to index with a prefix on it. I > searched around the posts a bit, and found: > > http://groups.google.com/group/thinking-sphinx/browse_thread/thread/639dd651b3f46e27/d3244fd922765be5?lnk=gst&q=concat#d3244fd922765be5 > > Unfortunately, in my case, the prefix is not in the db, so the above > solution wont work. I was wondering if there is another way to add the > prefix in the define_index. > > Thanks. > > -- > 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. > -- 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.
