Forum Moderators: coopster

Message Too Old, No Replies

If a mysql db table is updated for FULLTEXT searching

can I still use it for regular searching?

         

someone

6:24 pm on Aug 5, 2005 (gmt 0)

10+ Year Member



When you want to do full-text searching, you have to update your table with a command like this:

ALTER TABLE articles ADD FULLTEXT(body, title);

I was wondering once I've altered my table for fulltext searching, can I still use that table for REGULAR searching using for example, "SELECT * FROM articles WHERE body LIKE '%$keyword%'";?

I currently have a website that searches through the articles table using regular LIKE statements. And I am working on a new website, but i would like to try out fulltext searching with the same articles table on that new site. Since I have to alter the mysql table in order to do fulltext searching, I need to ensure that this alteration would still allow searching through regular LIKE statements.

I did a testing and I think the answer is "YES, it would still work on regular LIKE statements", but I would like to make sure from experts here. Thanks!

coopster

6:33 pm on Aug 5, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Yes :)
...but I'm too humble to let you call me an expert ;)

ergophobe

7:09 pm on Aug 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



FTR Coopster is an SQL expert.

Anyway, a little elaboration. What you are doing when you create a fulltext index is just that, creating an index, not altering the original contents of the column in any way. It creates a new access method, but it doesn't get rid of anything old.

See
[onlamp.com...]

coopster

11:01 pm on Aug 5, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



OK, then I'm a lazy expert.
I was going to elaborate, and should have, thanks for covering ergo.