Full Text Search not working...

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
jraede
Forum Contributor
Posts: 254
Joined: Tue Feb 16, 2010 5:39 pm

Full Text Search not working...

Post by jraede »

I just tried to add full-text searching to a database. I ran this query: mysql_query("ALTER TABLE `venues` ADD FULLTEXT(`meta`, `name`, `vdescription)");. Now I can search for things like "pete's bar" and it will show up as expected, using MATCH(`meta, `name`, `vdescription`) AGAINST('petes bar'). However, when I have this query, I get no match, even though the value "901" is in a venue's name column (the venue's name is "901 Bar & Grill".

Code: Select all

SELECT DISTINCT `venues`.*, MATCH(`meta`, `name`, `vdescription`) AGAINST ('901') AS venuescore FROM `venues` WHERE (MATCH(`meta`, `name`, `vdescription`) AGAINST ('901'))
Could this be because I'm using numerical values? I don't see how that would make a difference.
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: Full Text Search not working...

Post by yacahuma »

i dont know much about full text search, but are your using myisam tables?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Full Text Search not working...

Post by Benjamin »

Post Reply