In terms of what results I'm getting that are wrong... basically just
products from other categories other than the one I'm currently
viewing.
# 1. Primary index
class Product
define_index do
...
has "SELECT products.id * 1 + 0 AS id, c1.id AS category_ids FROM
products LEFT JOIN categories ON products.category_id = categories.id
LEFT OUTER JOIN categories c1 ON categories.lft BETWEEN c1.lft AND
c1.rgt", :as => :category_ids, :source => :query
end
end
# 2. New secondary index
class ProductApplication
define_index do
indexes whatever
end
end
Are there any gotchas I could be overlooking?
Thanks
Is ProductApplication a subclass of Product? Just wondering why you're stating the index as a secondary one...
Either way, looking at the generated *.sphinx.conf file (minus database passwords) is a good place to start. And what kind of search queries are you trying?
--
Pat
> --
>
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
>
>