Quick tutorial

Drop the ferreted.rb file in your Rails lib/ directory, include it in your config/environment.rb and use the acts_as_ferreted method in your ActiveRecord model class.

Basic use:

  acts_as_ferreted :fields => [ :title, :body, :created_at ]

Advanced Use:

Search

Then search like this:

  MyModel.ferret_search("+ruby -slippers", { ferret options }, { active record options })

will_paginate support

This example will return an array of objects suitable for use with the will_paginate plugin helpers:

  MyModel.ferret_search("frog squad", 
    { :limit => 10, :page => params[:page], :sort => 'updated_at' }, 
    :include => :author)

Maintenance

Rebuilding the database

MyModel.ferret_rebuild

Shared or remote index

TODO: Uses DRb, ferreted.yml, ferreted-drb-daemon.rb. drb rails environment etc.

Ferreted/Docs (last edited 2007-09-08 16:35:26 by JohnLeach)