I don't think you can just refer to the column normally with an explicit type, 
although it's worth a shot:

  has terms, :type => :multi

What's more likely to work is to do the same thing, but with a string SQL 
reference to the column, just so TS doesn't try to add extra SQL trickery:

  has 'table.terms', :as => :terms, :type => :multi

And then in searching:

  :with => {:terms => string.to_crc32}

Hopefully that does the trick :)

-- 
Pat

On 16/06/2010, at 3:29 PM, Christian Aust wrote:

> Hi Pat,
> 
> I'm fine with the crc32'ing, but how do I define a mva from a single
> string column?
> 
> Eventually my DB will contain a column "terms" which contains
> (comma?-) separated CRC32 values. No prob. How do I instruct ts/sphinx
> to break that into separate values? Regards,
> 
> Christian
> 
> On 15 Jun., 03:33, Pat Allan <[email protected]> wrote:
>> Hi Christian
>> 
>> If you want to filter by the strings, then you'd need to collect CRC32 
>> integers for each string value, and treat that as an MVA of integers. Then, 
>> when filtering, filter by the CRC32 value (TS adds a to_crc32 method to 
>> String instances - useful for caching in the db as well?).
>> 
>> Is that enough detail? Can be more precise if needed :)
>> 
>> Cheers
>> 
>> --
>> Pat
> 
> -- 
> 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.

Reply via email to