One of the best things about MySQL is the fulltext search, which uses some black magic to return a relevancy score. It usually works a treat, but I’ve come up against a problem which I can’t find documented anywhere. My problem was that, when performing a fulltext search, it was returning no results despite there clearly being some results it should display. What was particularly confusing was that I’d got the query working on a table with lots of test data in, but couldn’t get it working on the table I was actually planning to use.The nub of the problem turned out to be irritatingly simple – there wasn’t enough data in the table. It would appear that MySQL requires at least THREE rows of data in a table before it is able to run. Thinking about it logically, this number makes sense, considering that MySQL can only do a fulltext search on a word with at least three characters.
I wouldn’t ordinarily post this, but it’s been a real pain in the arse finding out the minimum number of rows and it doesn’t appear to be in Google.



