Sunspot / Solr full text search - how to index Rails associations
- by Sam
Is it possible to index through an association with Sunspot?
For example, if a Customer has_many Contacts, I want a 'searchable' block on my Customer model that indexes the Contact#first_name and Contact#last_name columns for use in searches on Customer.
acts_as_solr has an :include option for this. I've simply been combining the associated…