Install and configure sphinx
Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 11 commits ahead, 51 commits behind railsmachine:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
moonshine
recipes
spec
templates
README.rdoc

README.rdoc

Moonshine_Sphinx

A plugin for Moonshine

A plugin for installing and managing sphinx for a Rails application using thinking_sphinx. It handles:

* Ensuring sphinx is installed
* Using God managing and monitoring searchd
* Adding capistrano hooks to restart searchd on deploy
* Optionally adding a cron job for running the indexer

moonshine_sphinx requires:

* At least revision <blah> of moonshine
* moonshine_god to be installed as a plugin
* thinking_sphinx installed and configured

Instructions

  • script/plugin install git://github.com/railsmachine/moonshine_sphinx.git

  • script/plugin install git://github.com/railsmachine/moonshine_god.git

  • rake moonshine:gems if you config/gems.yml if you're using thinking_sphinx as a gem

  • Configure settings as needed:

    # in app/manifests/application_manifest.rb
    configure :sphinx => {
      :version => '0.9.9' # 0.9.8.1 is the default
      # run the cron every hour at 9 (no default)
      :index_cron => {
        :minute => 9 
      }
    } 
    # or in config/moonshine.yml
    :sphinx:
      :version: 0.9.9
      # run the cron every hour at 9 (no default)
      :index_cron:
        :minute: 9
  • Include the recipe in your Moonshine manifest:

    recipe :sphinx