This should work... is this exactly what you're doing, or is the state column 
holding other values? (eg: strings)

-- 
Pat

On 09/09/2012, at 10:45 AM, Prozac wrote:

> I have a column in my table which will have values - 1, 2, 3, 4. How do I 
> perform a thinking sphinx search on it, for one of the values. I did 
> something like this.
> 
> has "GROUP_CONCAT(DISTINCT users.state SEPARATOR ',')", :as => :user_state, 
> :type => :mult
> and in the search I did,
> 
> User.search(:with => {:user_state => [1]})
> But I'm not getting any results.
> 
> There must be a simpler solution than writing a separate has attribute for 
> each type
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/thinking-sphinx/-/KmgnqA8bpS0J.
> 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