Weird MySQL MATCH/AGAINST (Full-Text Search) Issue
Posted: Mon Aug 25, 2008 1:47 pm
I had this weird issue with MySQL MATCH/AGAINST syntax last night. I created the start of a mini-CMS with an articles table. I then did this:
Title is a varchar. Content is a text.
The table is a MyISAM table on MySQL Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486).
So then I stuck "test" into some of the titles, and again in some of the contents.
I then did:
And guess what? I got zero results back. So then I switched it like so:
And now results come back. Any idea why this occurs?
Code: Select all
ALTER TABLE articles ADD FULLTEXT(title, content);The table is a MyISAM table on MySQL Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486).
So then I stuck "test" into some of the titles, and again in some of the contents.
I then did:
Code: Select all
SELECT * FROM articles WHERE MATCH (title, content) AGAINST ('test');Code: Select all
SELECT * FROM articles WHERE MATCH (title, content) AGAINST ('test' IN BOOLEAN MODE);