rebuild index rake task, capistrano 2 recipes
[acts_as_ferret.git] / README
blob548b4652f81d1d9ca47c29f9528a79e529071d17
1 = acts_as_ferret
3 This ActiveRecord mixin adds full text search capabilities to any Rails model.
5 It is heavily based on the original acts_as_ferret plugin done by
6 Kasper Weibel and a modified version done by Thomas Lockney, which 
7 both can be found on http://ferret.davebalmain.com/trac/wiki/FerretOnRails
9 == Installation
11 === Installation inside your Rails project via script/plugin
13 script/plugin install svn://projects.jkraemer.net/acts_as_ferret/trunk/plugin/acts_as_ferret
16 === System-wide installation with Rubygems
18 <tt>sudo gem install acts_as_ferret</tt>
20 To use acts_as_ferret in your project, add the following line to your
21 project's config/environment.rb:
23 <tt>require 'acts_as_ferret'</tt>
25 Call the aaf_install script inside your project directory to install the sample
26 config file and the drb server start/stop script.
29 == Usage
31 include the following in your model class (specifiying the fields you want to get indexed):
33 <tt>acts_as_ferret :fields => [ :title, :description ]</tt>
35 now you can use ModelClass.find_by_contents(query) to find instances of your model
36 whose indexed fields match a given query. All query terms are required by default, 
37 but explicit OR queries are possible. This differs from the ferret default, but 
38 imho is the more often needed/expected behaviour (more query terms result in 
39 less results).
41 Please see ActsAsFerret::ActMethods#acts_as_ferret for more information.
43 == License
45 Released under the MIT license.
47 == Authors
49 * Kasper Weibel Nielsen-Refs (original author)
50 * Jens Kraemer <jk@jkraemer.net> (current maintainer)