Skip to content

Instantly share code, notes, and snippets.

@overture8
Created October 24, 2009 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save overture8/217569 to your computer and use it in GitHub Desktop.
Save overture8/217569 to your computer and use it in GitHub Desktop.
class Company < ActiveRecord::Base
# Sunspot/Solr search indexing
searchable do
string :name
text :profile
integer :media_type_id
integer :sector_type_id, :multiple => true do
sectors.map {|sector| sector.sector_type_id}
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment