views:

127

answers:

0

I have a index set up so I can facet on category ids, as following:

define_index
  ...

  has categorizings.category_id, :type => :multi, :facet => true
end

When I do a query like Listing.facets, I get the correct results in a hash, with each category_id pointing at its count. :)

The only problem is Thinking Sphinx runs a database query and loads many (but not all) of these objects! Since this attribute is just MVA integers; I wouldn't think they would require any translation.

What's going on here? Is there any way for performance's sake I can stop Thinking Sphinx from instanciating all these ActiveRecord objects?(there can be hundreds!) Or is there a better way to achieve this with Sphinx and Thinking Sphinx?

Thanks!