faqts : Computers : Databases : MySQL : Common Problems : Full Text Indexing

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

28 of 42 people (67%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

Does MySQL have a full text search capability?

Feb 11th, 2003 17:00
Philip Olson, Nathan Wallace,


Yes.  MySQL 3 has limited FULLTEXT capability while MySQL 4 will allow 
much more flexability, such as boolean searches and the ability to 
limit minimum word length (default is four).
The MySQL manual explains it's use:
  http://www.mysql.com/doc/en/Fulltext_Search.html
As well as a few tutorials:
  http://www.zend.com/zend/tut/tutorial-ferrara1.php
  http://www.devarticles.com/art/1/195
  http://www.databasejournal.com/features/mysql/article.php/1578331
The basic syntax is:
  SELECT *
  FROM tablefoo 
  WHERE MATCH(columnbar) AGAINST ('somevalue')
As I write this, MySQL is in beta.  Not sure when it'll be ready for 
production use but the FULLTEXT will be greatly improved!