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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D105b980e30e1b77fc761b1cd1b2de32?d=identicon&s=25 unknown (Guest)
on 2006-01-06 18:12
(Received via mailing list)
Hi,

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

  http://wiki.rubyonrails.com/rails/pages/TextSearch

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

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

--
Matt C. Wagner
Information Security Analyst

Network Intrusion Detection
Security Operations Center
Corporate Information Security
Wells Fargo Bank
D8cb8c8cd40ddf0cd05241443a591868?d=identicon&s=25 Duane Johnson (Guest)
on 2006-01-06 18:48
(Received via mailing list)
On Jan 6, 2006, at 10:09 AM, <Matt.C.Wagner@wellsfargo.com>
<Matt.C.Wagner@wellsfargo.com> 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 Johnson
(canadaduane)
http://blog.inquirylabs.com/
This topic is locked and can not be replied to.