fixing #160
[acts_as_ferret.git] / README
blob2b4774457601e93a970400f628f92695f357c1f7
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>
26 == Usage
28 include the following in your model class (specifiying the fields you want to get indexed):
30 <tt>acts_as_ferret :fields => [ :title, :description ]</tt>
32 now you can use ModelClass.find_by_contents(query) to find instances of your model
33 whose indexed fields match a given query. All query terms are required by default, 
34 but explicit OR queries are possible. This differs from the ferret default, but 
35 imho is the more often needed/expected behaviour (more query terms result in 
36 less results).
38 Please see ActsAsFerret::ActMethods#acts_as_ferret for more information.
40 == License
42 Released under the MIT license.
44 == Authors
46 * Kasper Weibel Nielsen-Refs (original author)
47 * Jens Kraemer <jk@jkraemer.net> (current maintainer)