Searchable plugin

Plugin details

Searchable is a Rails plugin that uses the Ferret toolkit (a Lucene derivative) to provide full-text search integration with ActiveRecord.

Websitehttp://mojodna.net/searchable/ruby/ Repositoryhttp://svn.mojodna.net/repository/acts_as_searchable/trunk/ Author Seth Fitzsimmons Tags Search LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://svn.mojodna.net/repository/acts_as_searchable/trunk/

The first way is to simply `include Searchable` which triggers Searchable's default behavior, which is to index all attributes returned by `Model.content_columns` using each attributes name as its field name within the index.

For example:

    class Person < ActiveRecord::Base
        include Searchable
        
        # attrs: first_name, last_name
    end


This model can then be searched:

    Person.search("seth")


This will attempt to match "_seth_" on all fields available in the index (_first\_name_ and _last\_name_). If you wish to target a specific field:

    Person.search("first_name: seth")

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, 7 months ago