Hi all,

Can I combine filters with thinking_sphinx?
I have messages:

class Message < ActiveRecord::Base
  belongs_to :sender, :class_name => 'User'
  belongs_to :recipient, :class_name => 'User'

  define_index do
    indexes :subject, :body
    indexes sender.name, :as => :sender_name
    indexes recipient.name, :as => :recipient_name

 
has :recipient_id, :deleted_for_recipient, :sender_id, :deleted_for_sender
  end
end

And I want to search messages, which not deleted
'where (sender_id = ? AND deleted_for_sender is null) OR (recipient_id
= ? AND deleted_for_recipient is null)

How should it implemented with :with/:with_all?

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