Using in Boolean mode to modify the program, MySQL can also perform 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 the rows containing the word "MySQL", but does not retrieve the line containing the word "yoursql".
Boolean Full-text search has the following characteristics:
They do not use a 50%-field value.
They do not categorize rows in the order in which they are in a weak correlation. You can see this in the above query results: The most relevant row is a row that contains two "MySQL", but it is listed in the final position, not the beginning position.
Even if there are no fulltext, they can still work, even though the search execution in this way is very slow.
The minimum word length full-text parameter and the maximum word length full-text parameter are applicable.
The Stop word applies.
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 row returned.
--
A leading minus sign indicates that the word must not appear in any returned rows.
(no operator)
In the default state (when no + or – is specified), the word is optional, but has a higher row level that contains the word. This and match () ... Against () does not use in BOOLEAN mode to modify a program in a similar operation.
> <
These two operators are used to change the effect of a word on the associated value assigned to a row. The > operator enhances its impact, while the < operator weakens its impact. See the example below.
()
Parentheses are used to divide words into child expressions. The enclosed brackets can be nested.
~
A leading tilde is used as a negative character to negate the effect of a word on the row's relevance. This is useful for words that mark "noise (useless information)." The rows containing such words are lower than other rows, but they may be used concurrently with the-number, so that no useless information rows are dispatched at any time.