Preetham
Preetham

Reputation: 3

Search Engine using php , InnoDB Engine Mysql

SELECT firstname, lastname,comments 
FROMusers 
WHERE MATCH(firstname,lastname,comments) 
AGAINST('$searchterm')

I tried the above one as query for search engine ,but mysql says FULL-TEXT INDEXING is supported only on MYISAM ,Engine i am using is innoDB,Please tell me the best way of coloumn INDEX searching ON InnoDB Engine.

Upvotes: 0

Views: 488

Answers (1)

hungneox
hungneox

Reputation: 9829

Based on my knowledge, MySQL FTS has been available for InnoDB since version 5.6 (http://dev.mysql.com/tech-resources/articles/whats-new-in-mysql-5.6.html)

You should take a look at MySQL Fulltex search document here http://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html

Basically, I think you should understand what is 'index' and how MySQL do indexing. This article is very useful for helping understand the mechanism behind MySQL fulltext search http://dev.mysql.com/doc/internals/en/full-text-search.html

There are several important concepts in full-text search:

  1. Boolean mode
  2. Natural language mode
  3. I also recommend you read about stopwords list in MySQL FTS.
  4. System variable likes ft_min_word_len is also important.

After understanding these things, I think you will know how to apply MySQL fulltext search properly.

Upvotes: 1

Related Questions