Skip to content

Commit

Permalink
add some docs for merb use to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Macey committed Jul 11, 2008
1 parent fdd56d7 commit 293b70b
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README
Expand Up @@ -16,6 +16,7 @@ If you use this software, please {make a donation}[http://blog.evanweaver.com/do
* MySQL 5.0, or PostgreSQL 8.2
* Sphinx 0.9.8-rc2
* Rails 2.0.2
* instead of Rails, Merb 0.9.3 is now supported

More recent versions than listed are usually ok.

Expand Down Expand Up @@ -65,6 +66,34 @@ Now, in your models, use the <tt>is_indexed</tt> method to configure a model as

For more index options, see ActiveRecord::Base .is_indexed.

== Merb Installation

Install Sphinx as above.

Download the latest version of this code from git:
git clone git://github.com/jamie/ultrasphinx.git

Build the gem:
rake package

Install the gem into your merb application locally:
gem install pkg/ultrasphinx-1.11.gem -i ~/projects/sample/gems

In config/init.rb, add these lines:
require 'erb' # for Ultrasphinx
require 'active_support' # for Ultrasphinx, mattr_accessor
dependency 'ultrasphinx'

Finally, copy the example configuration file over, and configure as usual.

Merb support includes ORM support for both DataMapper >0.9.2 and
ActiveRecord >2.1.0, detected automatically.

All other usage and configuration is the same as for Rails. As sphinx
interacts directly with the database, the actual technology used in an app
is less important than ensuring that the database and configuration file are
correct.

== Building the index

Now run:
Expand Down

0 comments on commit 293b70b

Please sign in to comment.