Everything noted.  Thanks for the fast reply! and, of course, this wonderful
app. :D

On Thu, Jun 24, 2010 at 11:21 AM, Pat Allan <[email protected]>wrote:

> Hi Jim
>
> Two things to note:
>
> * Sphinx has no concept of float arrays, only integer arrays
> * If price is/can-be an integer, then a normal filter should work, I'm
> pretty sure:
>
>  :with => {:size_prices => 0..10}
>
> Keep in mind the range arguments need to be integers. Also, aliases for
> fields & attributes should be symbols, not strings.
>
> Cheers
>
> --
> Pat
>
> On 24/06/2010, at 1:15 PM, Jim Ruther Nill wrote:
>
> > Hi!
> >
> > If you have a one-to-many association,
> >
> > Product - has_many :sizes
> > Size - belongs_to :product
> >
> > and a price attribute is on the Size model, how would you filter for a
> particular price range?
> >
> > The define index block in the product model
> >
> > define_index do
> > has sizes(:price), :as => 'size_prices'
> > end
> >
> > Thanks!
> >
> > -------------------------------------------------------------
> > visit my blog at http://jimlabs.heroku.com
> >
> > --
> > 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]<thinking-sphinx%[email protected]>
> .
> > For more options, visit this group at
> http://groups.google.com/group/thinking-sphinx?hl=en.
>
> --
> 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]<thinking-sphinx%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/thinking-sphinx?hl=en.
>
>


-- 
-------------------------------------------------------------
visit my blog at http://jimlabs.heroku.com

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