Feb
14
Enable Full Text Search with MySQL
February 14, 2010 | Leave a Comment
Before you jump and get a real Search Engine for your website, you might try the MySQL full text search feature.

It is incredibly easy to set up. All you need to do is setup the table and fields to be searchable as full text with the following command:
1 | ALTER TABLE Table_Name ADD FULLTEXT(field1, field2); |
Then, simply write a query using “match” to run your searches:
1 | SELECT * FROM Table_Name WHERE MATCH (field1, field2) AGAINST ('search_query') |
Happy Valentine’s Day
Filed under: Computing
Tagged with: full text, mysql, search
Liked this page?
Tweet it
Tweet
Subscribe to the RSS feed or sign up for the newsletter now.