public
Rubygem
Description: Rails full text search plugin
Homepage: http://rm.jkraemer.net/projects/show/aaf
Clone URL: git://github.com/jkraemer/acts_as_ferret.git
name age message
file .gitignore Tue Nov 25 03:23:54 -0800 2008 updated gitignore [jkraemer]
file LICENSE Tue Nov 25 03:22:00 -0800 2008 move plugin to top level [jkraemer]
file README Thu May 28 13:22:03 -0700 2009 0.4.4 [jkraemer]
file acts_as_ferret.gemspec Thu May 28 13:22:03 -0700 2009 0.4.4 [jkraemer]
directory bin/ Tue Nov 25 03:22:00 -0800 2008 move plugin to top level [jkraemer]
directory config/ Tue Nov 25 03:22:00 -0800 2008 move plugin to top level [jkraemer]
directory doc/ Tue Nov 25 03:22:00 -0800 2008 move plugin to top level [jkraemer]
file init.rb Tue Nov 25 03:22:00 -0800 2008 move plugin to top level [jkraemer]
file install.rb Tue Nov 25 03:22:00 -0800 2008 move plugin to top level [jkraemer]
directory lib/ Thu May 28 13:47:54 -0700 2009 fixes #228 remove :select options for counting ... [jkraemer]
file rakefile Mon Apr 13 12:21:01 -0700 2009 Add task to generate gemspec for release on github [cehoffman]
directory recipes/ Tue Nov 25 03:22:00 -0800 2008 move plugin to top level [jkraemer]
directory script/ Tue Nov 25 03:22:00 -0800 2008 move plugin to top level [jkraemer]
directory tasks/ Thu Apr 02 12:35:57 -0700 2009 Updated environment variable in task descrption [boone]
= 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 http://ferret.davebalmain.com/trac/wiki/FerretOnRails

== Project Homepage

http://rm.jkraemer.net/projects/show/aaf

== Installation

Aaf is available via git from rubyforge.org and github.com. Github also offers
tarball downloads, check out http://github.com/jkraemer/acts_as_ferret/tree/master .

=== Installation inside your Rails > 2.1 project via gem management

Add this to your projects config/environment.rb:

<tt>config.gem 'acts_as_ferret', :version => '~> 0.4.4'</tt>

Or, use github:

<tt>config.gem 'jkraemer-acts_as_ferret', :version => '~> 0.4.4', :lib => 'acts_as_ferret', :source => 
'http://gems.github.com'"</tt>

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

script/plugin install git://github.com/jkraemer/acts_as_ferret.git

The rubyforge repository is located at git://rubyforge.org/actsasferret.git

=== Old SVN repository

In november 2008 I stopped updating the svn repository that has been the main
repository for aaf for several years. In case you want to retrieve any of the
older versions of the plugin, it's still there at

svn://code.jkraemer.net/acts_as_ferret/

=== 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 the end of your
project's config/environment.rb:

<tt>require 'acts_as_ferret'</tt>

Call the aaf_install script that came with the gem 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_with_ferret(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 <jk@jkraemer.net> (current maintainer)