Help with TextSearch :all and MySQL


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

On Jan 6, 2006, at 10:09 AM, [email protected]
[email protected] wrote:


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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs