This is a common question at the moment, and given it's a little tricky to 
figure it out (indeed, it's something relatively new to me), I've just added it 
to the Thinking Sphinx docs:

http://freelancing-god.github.com/ts/en/common_issues.html#or_attributes

Cheers

-- 
Pat

On 30/12/2010, at 4:29 PM, Tiago Godinho wrote:

> Hello everybody. I have a little problem
> 
> I have the following activities indexed.
> 
> #<Activity user_id: 1, country_id: 1>
> #<Activity user_id: 2, country_id: 2>
> 
> And I need combine the two queries.
> 
> Activity.search :with => {:user_id => 1}
> Activity.search :with => {:country_id => 2}
> 
> I did that with UNION in SQL, but is terrible in Rails. Anyone have a
> good idea ?
> 
> Thanks and Happy New Year.
> 
> 
> -- 
> 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