Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A Sunspot wrapper for Mongoid.

tree: c67c826514

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 lib
Octocat-spinner-32 tasks
Octocat-spinner-32 test
Octocat-spinner-32 .document
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 init.rb
Octocat-spinner-32 sunspot_mongoid.gemspec
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'

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

Rake task

Reindex all solr models that are located in your application's models directory.

$ rake sunspot:reindex                # reindex all models
$ rake sunspot:reindex[,Post]         # reindex only the Post model
$ rake sunspot:reindex[,Post+Author]  # reindex Post and Author model

Links

Copyright

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

Something went wrong with that request. Please try again.