A Sunspot wrapper for Mongoid.
gem install sunspot_mongoid
class Post
include Mongoid::Document
field :title
include Sunspot::Mongoid
searchable do
text :title
end
end
add a gem to Gemfile as following,
gem 'sunspot_mongoid'
create config/initializers/sunspot_mongoid.rb,
Sunspot.session = Sunspot::Rails.build_session
ActionController::Base.module_eval { include(Sunspot::Rails::RequestLifecycle) }
add gems to Gemfile as following,
gem 'sunspot'
gem 'sunspot_rails'
and install sunspot_mongoid as rails plugin,
rails plugin install git://github.com/jugyo/sunspot_mongoid.git
Copyright (c) 2010 jugyo. See LICENSE for details.