Only way I can think of is to add a manual attribute to all other  
methods:
   has '0', :as => :user_id, :type => :integer

And then filter by both zero and the actual user id:
   :with => {:user_id => [0, @current_user.id]}

-- 
Pat

On 18/08/2009, at 2:54 PM, slainer68 wrote:

>
> Hi,
>
> I've got an application where my customer wants a "global search" to
> search on all applications models.
>
> That's easy thanks to TS global search with ThinkingSphinx.search.
>
> But my models include a Message model, and I should only include
> messages that belongs to the current user (message.user_id ==
> current_user.id).
>
> Is there an easy solution to do that with Thinking Sphinx ?
>
> Nicolas.
>
> >


--~--~---------~--~----~------------~-------~--~----~
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