OH!

It's a :with vs :conditions thing, right?

I asked Pat before finding this group, and he replied:

> Hi François
> Sphinx stores nils/NULLs as 0’s – and datetimes as timestamps (ie: integers) 
> so they’ll be 0’d as well – so give the following a shot:
> Party.search(:with => {:archived_at => 0})
> (:conditions instead of :with will work as well, I just usually keep 
> attribute filters in :with, field filters in :conditions).

So, why would :with work, while :conditions doesn't?

Thanks!
François

On 9 oct, 01:49, James Healy <[EMAIL PROTECTED]> wrote:
> François Beausoleil wrote:
> > Party.search("beausoleil", :conditions => {:archived_at => nil})
> > Party.search("beausoleil", :conditions => {:archived_at => 0})
>
> > Both of these fail and return models which are archived.
>
> > Does anybody have any ideas how I can exclude those models from my
> > search results?
>
> try:
>
> Party.search("beausoleil", :with => {:archived_at => 0})
>
> -- James Healy <jimmy-at-deefa-dot-com>  Thu, 09 Oct 2008 16:47:56 +1100
--~--~---------~--~----~------------~-------~--~----~
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