MYSQL入门学习之三:全文本搜索(三)
ha–beta and beta–beta. This line fro
m chromatography .data systems (CDSs) and to LIMS. |
+---------+---------------------------------------------------------------------
---------------------------------------------------------+
2 rows in set (0.00 sec)
即使没有FULLTEXT索引也可以使用布尔文本搜索。但是非常缓慢。
mysql> select note_id,note_text/*匹配line且不包含systems*/
-> fromproductnotes
-> whereMatch(note_text) Against('line -systems*' in boolean mode);
+---------+---------------------------------------------------------------------
---------------------------------------------------------+
| note_id | note_text
|
+---------+---------------------------------------------------------------------
---------------------------------------------------------+
| 5 | This line ofproprietary reagents,. containers, and automation tools
is designed. forgenomics and drug discovery .research. |
+---------+---------------------------------------------------------------------
---------------------------------------------------------+
1 row in set (0.00 sec)
mysql> select note_id,note_text/*匹配line且匹配systems*/
-> fromproductnotes
-> whereMatch(note_text) Against('+line +systems' in boolean mode);
+---------+---------------------------------------------------------------------
---------------------------------------------------+
| note_id | note_text
|
+---------+---------------------------------------------------------------------
---------------------------------------------------+
| 7 | specificitiesinclude both alpha–beta and beta–beta. This line fro
m chromatography .data systems (CDSs) and to LIMS. |
+---------+---------------------------------------------------------------------
---------------------------------------------------+
1 row in set (0.00 sec)
mysql> select note_id,note_text/*匹配line或匹配systems*/
-> fromproductnotes
-> whereMatch(note_text) Against('line systems' in boolean mode);
+---------+---------------------------------------------------------------------
---------------------------------------------------------+
| note_id | note_text
|
+---------+---------------------------------------------------------------------
---------------------------------------------------------+
| 5 | This line ofproprietary reagents,. containers, and automation tools
is designed. forgenomics and drug discovery .research. |
| 6 | LimsLink is.designed to interface output. from chromatography .data
systems (CDSs) and toLIMS. |
| 7 | specificitiesinclude both alpha–beta and beta–beta. This line fro
m chromatography .data systems (CDSs) and to LIMS. |
+---------+---------------------------------------------------------------------
---------------------------------------------------------+
3 rows in set (0.00 sec)
mysql> select note_id,note_text/*匹配短语*/
-> fromproductnotes
-> whereMatch(note_text) Against('"This line"' in boolean mode);
+---------