MySQL full-text search uses in boolean mode to modify the program. MySQL can also execute BOOLEAN full-text search:
Mysql> SELECT * FROM articles where match (title, body)
-> AGAINST ('+ MySQL-yoursql' in boolean mode );
+ ---- + ----------------------- + ------------------------------------- +
| Id | title | body |
+ ---- + ----------------------- + ------------------------------------- +
| 1 | MySQL Tutorial | DBMS stands for DataBase... |
| 2 | How To Use MySQL Well | After you went through a... |
| 3 | Optimizing MySQL | In this tutorial we will show... |
| 4 | 1001 MySQL Tricks | 1. Never run mysqld as root. 2... |
| 6 | MySQL Security | When configured properly, MySQL... |
+ ---- + ----------------------- + ------------------------------------- +
This query retrieves all rows containing the word "MySQL", but does not retrieve rows containing the word "YourSQL.
Boolean full-text search has the following features:
◆ They do not use 50% domain values ..
◆ They do not classify rows in the order of weak correlations. You can see this from the above query results: the row with the highest relevance is a row containing two "MySQL", but it is listed at the last position rather than the start position.
◆ Even if FULLTEXT is not available, they can still work, although the search execution speed in this method is very slow.
◆ Full-text parameters of minimum word length and maximum word length are applicable.
◆ Applicable to stopword.
The performance of Boolean full-text search supports the following operators:
◆ +
A leading plus sign indicates that the word must appear at the beginning of each returned line.
◆-
A leading minus sign indicates that the word cannot appear in any returned row.
◆ (No operator)
In the default state (when not specified + or