Nope, that only seems to get me the values in the 2-5 range.  I also
tried passing two ranges, but that returns no results (which probably
makes sense).

No worries, for the requirements I'm dealing with, I can handle this
case with custom SQL, I was more curious than anything else.  Thanks
for the suggestion.

- Josh

On Aug 14, 5:35 pm, Pat Allan <[email protected]> wrote:
> 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,Joshwrote:
>
>
>
>
>
> > 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