Forum: Ruby on Rails Help with TextSearch :all and MySQL

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
unknown (Guest)
on 2006-01-06 19:12
(Received via mailing list)

I really need help with making the 'searches_on :all' in Duane J.'s
TextSearch work with MySQL (not sure if it works with other db's).

I realize that there are other search packages out there. But this
particular solution best fits my small needs of searching a small

I've gotten it to work when specifying the specific table column names:

  searches_on :title :address :foobar

But due to the nature of my application which switches primary db tables
based on user choice, I really need the dynamism of 'searches_on :all'
to work so that search functionality works with any table (where column
names differ).

I've been studying the code of Duane's 'search.rb', but cannot find the
bug that stops ':all' from working.

Can somebody please suggest a fix?

Thank you!


Matt C. Wagner
Information Security Analyst

Network Intrusion Detection
Security Operations Center
Corporate Information Security
Wells Fargo Bank
Duane J. (Guest)
on 2006-01-06 19:48
(Received via mailing list)
On Jan 6, 2006, at 10:09 AM, <removed_email_address@domain.invalid>
<removed_email_address@domain.invalid> wrote:

> database.
> column
>    Matt
Hi Matt,

I'm not sure what the exact problem is, but I do have one suggestion:
try removing the 'searches_on' altogether and see if the default
"just works".  If I remember correctly, the searches_on was an
afterthought because my particular need was to search everything
automatically, like yours.

If that doesn't work, can  you help me understand what's happening
(or not happening), e.g. logs or otherwise?  It might help if you
could send some query strings to the log, too--just to see what it's
doing underneath.

Duane J.
This topic is locked and can not be replied to.