Try the following - although to be honest, I'm not sure if it'll work  
with a single value *and* a range.
   Model.search :with_all => {:some_attr => [0.0, (2.0..5.0)]

-- 
Pat

On 14/08/2009, at 7:54 PM, Josh wrote:

>
> Hi,
>
> I've got an attribute that is a float, and I want to be able to filter
> by a range, but also include values that are nil/zero.  Doing one or
> the other works fine:
>
> Model.search(:with => {:some_attr => (2.0..5.0) })
> Model.search(:with => {:some_attr => 0})
>
> But what I really want is something like this:
>
> Model.search(:with => {:some_attr => [0, (2.0..5.0)] })
>
> Am I missing some obvious way to do this, or will I need to do some
> custom SQL for the index field?
>
> Thanks,
>
> - Josh
> >


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