Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A Sunspot wrapper for Mongoid.
Ruby
Branch: master
Pull request Compare This branch is 16 commits ahead, 15 commits behind jugyo:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
tasks
test
.document
.gitignore
LICENSE
README.md
Rakefile
VERSION
aq1018-sunspot_mongoid.gemspec
init.rb

README.md

sunspot_mongoid

A Sunspot wrapper for Mongoid.

Install

gem install sunspot_mongoid

Examples

class Post
  include Mongoid::Document
  field :title

  include Sunspot::Mongoid
  searchable do
    text :title
  end
end

For Rails3

as gem:

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) }

as plugin:

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

Links

Copyright

Copyright (c) 2010 jugyo. See LICENSE for details.

Something went wrong with that request. Please try again.