This search takes advantage of the whole array of Boolean fulltext searching in MySQL. It works essentially the same way that Google does, with a few
slight twists. For easily communicated instructions, a Boolean "AND" can be queried by placing the term "AND" between terms. A Boolean "OR"
query can be structured similarly: with "OR" placed between terms.
- + (plus)
- Indicates that a term is REQUIRED to be present in each returned row.
- - (minus)
- Indicates that the term must NOT be present in each row returned. Only acts to exclude rows which are matched by other search terms.
Used by itself, the minus operator will return an empty set.
- (no operator)
- If no operator is specified, the term is optional. Its presence, however, will give that row a higher relevancy in the search results.
- < (less than) and > (greater than)
- Used to increase or decrease the relevancy ranking of a term. > increases the value of that term and < decreases that value.
- ( ) (parentheses)
- Parentheses are used to group subexpressions, and can be nested.
- ~ (tilde)
- Similar to the minus operator, the tilde causes the presence of a term to decrease the relevancy of a returned row, but does not exclude that row
from the results.
- * (asterisk)
- The asterisk is a wildcard operator - it must be appended to a word, instead of preceding it, and will match any term which
begins with that sequence of characters.
- “ ” (quotation characters)
- Quotations will require the enclosed phrase to be matched exactly as typed. Prior to MySQL 5.03, word characters and non-word characters
were matched exactly. As of MySQL 5.03 and later, non-word characters no longer need to match exactly. Example: "test phrase" can
now return "test,phrase".