Oct 26

Need to do full text search in your application? Get a Ferret.

Tag: Flex and RailsDerek Wischusen @ 12:23 am

 Ferret Logo

Ferret is a Ruby implementation of the Apache Lucene text search engine, and like most things in Ruby on Rails using it in your application is extremely easy.  Here is all you need to do:

   1.  Open up a command line and install Ferret:

 gem install ferret

 

   2.  Then install the acts_as_ferret plugin in your Rails application folder:

ruby script/plugin install svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret

 

   3.  Crack open the model class that wraps the table that you want to search and add:

acts_as_ferret

For example, if you wanted to be able to search the bugs in an issue tracker you could add:

class Bug < ActiveRecord::Base
    acts_as_ferret :fields => [ 'description']
end

Where :fields specifies which fields you want to index.  If you do not include this all of the fields will be indexed.

 

   4.  then add something like the following to your controller class:

def search
    @bugs= Bug.find_by_contents(params[:query])
    render(:xml => @bugs.to_xml)
end

  

   5.  lastly, you can call this method from Flex using an HTTPService.

For example, the following would return all of the bugs that contain the word ‘error’ in the description field:

searchBugs.send({query:"error"});

Leave a Reply

Where can i buy phentermine online without a prescription
Cialis 20mg effects
Cheapest online tramadol
Fast shipping viagra
Tramadol no prescription next day
Discount phentermine 37.5 without prescription
Buy viagra uk
Tramadol no prescription overnight
Genuine pfizer viagra
Overnight delivery viagra
Phentermine 37.5 pills
Buy viagra online safely
Viagra prices
Buy cialis online cheap
Free samples of viagra
Viagra doses
Cialis 10
Cheap cialis generic
Tramadol 200mg
Buy brand viagra online
Generic viagra canadian pharmacy
Cialis 20mg tablets
Cialis 10mg tablets
Buying cialis without a prescription
Viagra in usa
Phentermine hcl 37.5 no prescription
Purchase cialis
Where to buy prednisone without a prescription
Buy viagra uk without prescription
Buy valium with no prescription
Cialis online pharmacy canada
Buying phentermine online
Where to buy xanax
50 mg viagra online
Generic viagra online pharmacy
Buy phentermine diet pills online
Phentermine 37.5 lowest price
Where to buy phentermine online
Levitra prices canada
Cheap levitra uk
Canadian viagra prices
Cialis in uk
10 mg valium effects
100mg tramadol buy
Online prescription for xanax
Get viagra prescription online
Propecia online without prescription
Buy xanax online without a prescription
Discount phentermine
Phentermine in the uk
Cheap levitra pills
Tramadol price
Buying generic viagra
No prescription phentermine
Generic propecia for sale
Where can i buy generic viagra
Generic cialis from canada
Order generic cialis
Viagra usa online
Discount tramadol
Propecia by mail
Levitra lowest price
Cialis information
Order generic viagra
Valium for sale in the uk
Cheap propecia uk
Generic cialis online canada
40 mg prednisone side effects
Tramadol dosage
Canadian cialis online
Cialis prescription canada
Tramadol online no prescription
Buying phentermine without a prescription
Discount xanax
Buy phentermine direct pharmacy cheap
Phentermine 37.5 tablets
Cheap viagra from india
37.5mg phentermine
Cod tramadol overnight
Cheapest phentermine
Where to buy propecia in australia
Buy viagra without a prescription
Buy tramadol hydrochloride
Viagra without rx
Phentermine 37.5 online prescription
Viagra dosage information
Viagra without prescription
Buying generic cialis online
Canada phentermine 37.5
Valium online fast delivery
Viagra online cheap
Order levitra online
Where to buy levitra
Buy cheap valium online
Generic viagra in the us
Dosage of prednisone
Best viagra dose
Where can i buy viagra without prescription
Phentermine 37.5 results
Buying valium uk
Generic viagra professional
Propecia cheapest price
Valium for sale uk
Overnight viagra delivery
Viagra express shipping
Where to buy xanax bars
Best way to take tramadol
Cheap generic xanax
5mg valium
Valium online no prescription
Buy cialis generic
Viagra 100mg effects
Cialis buy uk
Tramadol hcl 200mg
Valium uk delivery
Generic cialis professional
Generic viagra in india
Where to buy phentermine 37.5 without a prescription
Purchase phentermine without a prescription
Generic viagra for sale
Viagra online sales
Discount levitra
Brand cialis 100mg
Cialis online overnight
Cialis 10mg price
Cheap cialis viagra
Cheap generic viagra
Brand valium
Viagra for sale
Buy generic phentermine
Order cialis from canada
Generic viagra cheap
Buy cheap generic viagra online
Buy xanax with prescription
Phentermine 37.5 reviews
Phentermine 37.5 diet pills
Prescription xanax
Brand name viagra online without prescription
Cialis for sale online
Buying cheap viagra
50mg cialis
Generic levitra 20mg
Cheap xanax no prescription
Cialis soft tablets
Cheap propecia canada
Canada pharmacy viagra
Viagra pfizer price
Order xanax without prescription
Generic viagra sales
Buy cheap tramadol without prescription
Tramadol hcl 50mg side effects
Xanax overnight delivery
Phentermine no prescription
Phentermine 37.5 capsules
Cialis to buy
Viagra prescriptions
Cialis generic 5mg
Brand levitra
Buy prednisone dose pack
Overnight viagra
Uk viagra over the counter
Cialis buy online
Free viagra samples online
Buy levitra online without prescription
Xanax with no prescription
Where can i buy tramadol
Purchase viagra canada
Propecia buy canada
Buy viagra in las vegas
Levitra canadian pharmacy
Online prescriptions xanax
Brand cialis without prescription
Free cialis samples without prescription
Buy tramadol without a prescription
Buy cialis brand
Buy valium no prescription
Order cheap phentermine
Viagra discount prices
Prescription phentermine 37.5 mg
Online prescription phentermine
Discount propecia
Buy real viagra online without prescription
Brand viagra for sale
Phentermine without a prescription
Discount generic viagra
Viagra prescription cost
Cheap online tramadol
Cialis uk supplier
Buy prednisone
2mg xanax
Cheap cialis prices
Buy cheapest viagra online
Propecia prices uk
Buying levitra in australia
Viagra soft tablets
Viagra online without prescription free shipping
Viagra sale uk
Canada generic viagra
Buy roche valium uk
Cheap 100mg viagra
Generic cialis information
Valium for sale in uk
Buy propecia without a prescription
Generic viagra uk
Buy viagra online cheap
Phentermine online canada
Get viagra without a prescription
Propecia online prescription
Price propecia
Buy viagra without prescription
Phentermine online pharmacy
Buy viagra london
Order viagra overnight
Online xanax no prescription
Ordering phentermine online
Female viagra uk
Cialis uk online
Where to buy propecia in canada
Viagra discounts
Viagra discount coupons
Buy viagra online uk
Where to buy phentermine 37.5 without prescription
Cialis professional 20 mg
Phentermine 37.5mg diet pills
Cheap phentermine 37.5 without prescription
Buy cheap viagra
Tramadol rx online
Buy viagra with no prescription
Phentermine rx
Cialis professional generic
Best prices for viagra
Canada viagra prescription
Get viagra in canada
Xanax drug dosage
Buying viagra
20 mg valium
Price of phentermine
Xanax prescription prices
Valium pill
Viagra online without prescription overnight
Cialis
Canada pharmacy phentermine
Viagra 50mg side effects
Cheap tramadol overnight delivery
Buy brand name cialis
Buy viagra in canada online
Cialis pricing
Buy female viagra without prescription
Price of viagra tablets in india
Generic cialis no prescription