Hi, quick response you can use :boolean match mode
http://freelancing-god.github.com/ts/en/searching.html#matchmodes Kirill R On 8 June 2011 14:35, Josh <[email protected]> wrote: > After much digging, I don't think this possible - but it can't hurt to > ask: > > I have Events, and they belong to Users. Events can be published or > not published. > > I want to: > > a) If no user is logged in return only published events > b) If a user is logged in return published events OR user_id == > current_user.id > > So, I'd be passing current_user.id into search() > > So for published, I've got this index: > > indexes "published_at < now()", :as => :published > > so, :conditions => {:published => 1} for the published events > > How do I add the OR condition to this? > > > > > > > > > > > > > -- > 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. > > -- ** *"To recurse is human, to box a continuation into an object and send it across a network is divine. " -- Andy Kitchen* * * * "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." -- Brian W. Kernighan. * -- 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.
