Skip to content

Instantly share code, notes, and snippets.

@starrhorne
Created January 19, 2012 02:39
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 starrhorne/1637340 to your computer and use it in GitHub Desktop.
Save starrhorne/1637340 to your computer and use it in GitHub Desktop.
# app/models/job.rb
class Job
# job.specializations will hold an array of strings
# like this: ['rails', 'javascript']
serialize :specializations, Array
# Solr will index each element of the array separately
searchable do
string :specializations, :multiple => true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment