Searching large tables with Rails?


#1

I have a large table (> 20,000 records) with text columns for which I
need to build a search function. Is there a “Rails” way to index all
the entries and NOT search using LIKE?

“LIKE” searches can get very slow and I would rather build an index
of the columns to speed up things.

Just want to know if there is something like “acts_as_indexable”
available in ROR? Or even a way to quickly create a keyword index?

I appreciate your assistance very much.

Thanks
Frank


#2

Check out Ferret:
http://wiki.rubyonrails.org/rails/pages/HowToIntegrateFerretWithRails
Supa’ Fast !


#3

Thanks Dylan.
I installed and it works great except that I cannot access it via
httpd. On :3000 it works fine.

Other controllers and action on the same application work fine on
httpd?

Any ideas what could be causing this?

Thanks
Frank

Dylan S. removed_email_address@domain.invalid wrote: Check out Ferret:
http://wiki.rubyonrails.org/rails/pages/HowToIntegrateFerretWithRails
Supa’ Fast !


#4

I corrected the permission and it works. Yay!
Thanks
Frank

softwareengineer 99 removed_email_address@domain.invalid wrote: Thanks Dylan.
I installed and it works great except that I cannot access it via
httpd. On :3000 it works fine.


#5

Hmm… no clue. It should work just like any other controller. I guess
just make sure your /index folder (the one holding the indexes, wherever
you
put them) has the correct permissions… etc.
That’s all I can think of.