freelancing-god/thinking-sphinx — pull request #372 by pixeltrix (2012-07-18 10:45:51+00:00)
Title: Add support for association-filtered faceting

It's a common use case that faceting needs to be scoped to a subset.
Whilst this can be done manually, it's easy to extend the built-in
support for association-filtered searching to faceting as well, e.g:

Currently:

@facets = Product.facets :with => { :manufacturer_id => @manufacturer.id }

After this commit:

@facets = @manufacturer.products.facets

Whilst technically this changes current behavior the difference
between searching and faceting through an association is inconsistent
and I feel it should be considered a bug.