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 need my system to have dynamic facets per product category, > otherwise I will have to create more than 300 different product > types...
I have never used Thinking Sphinx or even plain Sphinx, still, here are my 2ยข: It seems to me that your problem is that you have a meta-model toolkit on the one hand, your Category, Product, AttributeType, and Attribute classes. While on the other hand, you want to define concrete facets such as author, brand, etc. on top of that. That may be possible, but probably it is not. I've had a quick look at the code for Thinking Sphinx and you'll probably be able to find what you need if you start studying it closely starting from its ActiveRecord integration. I don't think you will be able to achieve your goal without understanding details of how Thinking Sphinx works, as you're trying to stretch it beyond its intended use. Michael -- Michael Schuerig mailto:[email protected] http://www.schuerig.de/michael/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

