All,

How would I index attribute of a a one-to-many-to-many association?

Example:

House ==> has many bedrooms
each bedroom has many doors, of a certain color. I don't have
a :through relationship because it's one to many, so house_id is
stored on the bedroom table.

How would I tell it to index it so that House knows how many colored
doors it has for its bedrooms? I'd like to do something like this
(obviously it doesn't work):

class House << ActiveRecord::Base
   has_many :bedrooms

  define_index do
    indexes bedrooms.doors.color, :as => :bedroom_door_color, :facet
=> true
  end

end

Thanks.

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