不是所有的数据表都支持全文检索 MySQL支持多种底层数据库引擎,但是并非所有的引擎支持全文检索 ,目前最常用引擎是是MyISAM和InnoDB;前者支持全文检索,后者不支持。
booolean模式操作符

实验:
表productnotes :
 
  
 
1.查询包含rabbit的行,并按照相关性排序
SELECT note_text
FROM productnotes
WHERE Match(note_text) Against('rabbit');2.显示每一条的相关性值
mysql> SELECT note_text,
    ->  Match(note_text) Against('rabbit') AS match_rank
    -> FROM productnotes3.有heavy 但是没有rope
mysql> SELECT note_text
    -> FROM productnotes
    -> WHERE Match(note_text)
    ->  Against('heavy -rope*' IN BOOLEAN MODE);4.都有
SELECT note_text
FROM productnotes
WHERE Match(note_text)
Against('+rabbit +bait' IN BOOLEAN MODE);5.有一个就行
SELECT note_text
FROM productnotes
WHERE Match(note_text)
Against('rabbit bait' IN BOOLEAN MODE);6.必须是引号中间的样子
SELECT note_text
FROM productnotes
WHERE Match(note_text)
Against('"rabbit bait"' IN BOOLEAN MODE);7.排序是rabbit靠前 carrot 靠后
SELECT note_text
FROM productnotes
WHERE Match(note_text)
Against('>rabbit <carrot' IN BOOLEAN MODE);









