[Rails] Re: Product Search Engine Design with Sphinx and Faceted Search

2009-05-25 Thread Michael Schuerig
On Monday 25 May 2009, Daniel Jorge wrote: > The problem is that facets in Thinking Sphinx are defined per model > field. If I had a Book model with the field :autor, I could just do > this with Thinking Sphinx on the Book model: > > define_index do > indexes author, :facet => true > end > > I

[Rails] Re: Product Search Engine Design with Sphinx and Faceted Search

2009-05-25 Thread Colin Law
I understand. Sorry, I do not know enough about how the inner workings of Sphinx to be able to help. Can anyone else help? Colin 2009/5/25 Daniel Jorge > > Hi thank you for your answer > > The models you wrote are ok, I just simplified them for illustration > purposes. > > My problem is with

[Rails] Re: Product Search Engine Design with Sphinx and Faceted Search

2009-05-25 Thread Daniel Jorge
Hi thank you for your answer The models you wrote are ok, I just simplified them for illustration purposes. My problem is with search facets (filtering) using Thinking Sphinx. Suppose that I had a book model with the fields author, publisher and year. When a customer select the book category,

[Rails] Re: Product Search Engine Design with Sphinx and Faceted Search

2009-05-25 Thread Colin Law
I think there may be something wrong with your model. Firstly I think you need Category has_many :products has_many :attribute_types Product belongs_to :category has_many :attributes AttributeType belongs_to :category has_many :attributes Attribute belongs_to :product belongs_to :