# Searching large tables with Rails?

**URL:** <https://www.ruby-forum.com/t/searching-large-tables-with-rails/101754>\
**Category:** Rails\
**Created:** [February 6, 2006, 11:24pm UTC](https://www.ruby-forum.com/t/searching-large-tables-with-rails/101754 "2006-02-06T23:24:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![softwareengineer\_99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@softwareengineer\_99](https://www.ruby-forum.com/u/softwareengineer_99)\
**Post date:** [February 6, 2006, 11:24pm UTC](https://www.ruby-forum.com/t/searching-large-tables-with-rails/101754/1 "2006-02-06T23:24:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![softwareengineer\_99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@softwareengineer\_99](https://www.ruby-forum.com/u/softwareengineer_99)\
**Post date:** [February 6, 2006, 11:27pm UTC](https://www.ruby-forum.com/t/searching-large-tables-with-rails/101754/2 "2006-02-06T23:27:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![softwareengineer\_99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@softwareengineer\_99](https://www.ruby-forum.com/u/softwareengineer_99)\
**Post date:** [February 7, 2006, 12:47am UTC](https://www.ruby-forum.com/t/searching-large-tables-with-rails/101754/3 "2006-02-07T00:47:44Z")

</div>

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](mailto:removed_email_address@domain.invalid) wrote: Check out Ferret:  
[http://wiki.rubyonrails.org/rails/pages/HowToIntegrateFerretWithRails](http://wiki.rubyonrails.org/rails/pages/HowToIntegrateFerretWithRails)  
Supa’ Fast !

---

<div class="post-metadata">

**Author:** ![softwareengineer\_99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@softwareengineer\_99](https://www.ruby-forum.com/u/softwareengineer_99)\
**Post date:** [February 7, 2006, 12:50am UTC](https://www.ruby-forum.com/t/searching-large-tables-with-rails/101754/4 "2006-02-07T00:50:49Z")

</div>

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

softwareengineer 99 [removed\_email\_address@domain.invalid](mailto: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.

---

<div class="post-metadata">

**Author:** ![softwareengineer\_99](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@softwareengineer\_99](https://www.ruby-forum.com/u/softwareengineer_99)\
**Post date:** [February 7, 2006, 6:13pm UTC](https://www.ruby-forum.com/t/searching-large-tables-with-rails/101754/5 "2006-02-07T18:13:25Z")

</div>

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.
