Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Vladimir Shkurin's Profile

GitHub User: vshkurin

Comments by Vladimir Shkurin

Avatar

I used a Sunspot with Mongoid like:

gem 'sunspot_mongoid'

ruby
#lib/tasks/sunspot.rake 
namespace :sunspot do
  namespace :solr do
    desc "indexes searchable models" 
    task :index => :environment do 
      #[list your models here].each {|model| Sunspot.index!(model.all)}
      [Article, Tag, User].each {|model| Sunspot.index(model.all)}
      Sunspot.commit
    end
  end
end
Avatar

I advise to pay attention to ElasticSearch and Tire. He also ??based on Lucene, supports real time indexing and easy scalability. But if you don't need it, then better use the Sunspot :)