I just added a new, second index, and I'm now getting incorrect
results... and I'm not touching/using the new index. If I remove the
new/second define_index block, the problem goes away. The second
index is bare bones. The problem appears to be related to a source
query attribute in my primary index. Enabling my new/second index,
and commenting out the source query attribute, and replacing it with a
simple category_id attribute and things work.
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
--
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.