descriptionGit mirror of the acts_as_ferret Rails plugin's SVN
homepage URL
last changeMon, 4 Feb 2008 13:43:15 +0000 (4 13:43 +0000)
content tags
= acts_as_ferret

This ActiveRecord mixin adds full text search capabilities to any Rails model.

It is heavily based on the original acts_as_ferret plugin done by
Kasper Weibel and a modified version done by Thomas Lockney, which 
both can be found on

== Installation

=== Installation inside your Rails project via script/plugin

script/plugin install svn://

=== System-wide installation with Rubygems

<tt>sudo gem install acts_as_ferret</tt>

To use acts_as_ferret in your project, add the following line to your
project's config/environment.rb:

<tt>require 'acts_as_ferret'</tt>

Call the aaf_install script inside your project directory to install the sample
config file and the drb server start/stop script.

== Usage

include the following in your model class (specifiying the fields you want to get indexed):

<tt>acts_as_ferret :fields => [ :title, :description ]</tt>

now you can use ModelClass.find_by_contents(query) to find instances of your model
whose indexed fields match a given query. All query terms are required by default, 
but explicit OR queries are possible. This differs from the ferret default, but 
imho is the more often needed/expected behaviour (more query terms result in 
less results).

Please see ActsAsFerret::ActMethods#acts_as_ferret for more information.

== License

Released under the MIT license.

== Authors

* Kasper Weibel Nielsen-Refs (original author)
* Jens Kraemer <> (current maintainer)
2008-02-04 jk#200 and #201master
2008-02-04 jk#199
2008-02-02 jkblank_slate fix for Rails < 2.x; cap recipe
2008-02-02 jk#191 - raise error when environment.rb is not found...
2008-02-02 jk#194
2008-02-02 jkadd task to symlink shared/index into current/
2008-02-02 jkfix #149 - handle DRb errors by default
2008-02-02 jk#188 - allow for aliased fields
2008-02-02 jk#189 - allow for per-document analyzers
2008-02-02 jk#193
2008-02-02 jk#195
2008-02-01 jkrebuild index rake task, capistrano 2 recipes
2008-01-19 jkmore information when document_number method fails
2008-01-19 jkgit-svn-id: svn://
2008-01-16 jklet ferret index logger inherit the log level of AR...
2007-12-16 jkapplied patch from #176 to allow for DRb over unix...
10 years ago master