MySQL FULLTEXT with BOOLEAN MODE
MySQL FULLTEXT with BOOLEAN MODE is a SQL function in the MySQL Specific category. MySQL full-text search in boolean mode supports operators: + (required), - (excluded), * (wildcard), > < (ranking). The syntax is SELECT * FROM articles WHERE MATCH(title, body) AGAINST('+term -exclude' IN BOOLEAN MODE);. It accepts title, body. It returns boolean search results. A typical example: CREATE FULLTEXT INDEX ft_articles ON articles (title, body); -- Boolean mode operators: SELECT * FROM articles WHERE MATCH(title, body) AGAINST('+database +optimization -sql' IN BOOLEAN MODE); -- Must contain: database AND optimization -- Must NOT contain: sql -- Wildcard: SELECT * FROM articles WHERE MATCH(title, body) AGAINST('optim*'); -- Matches: optimization, optimize, optimum -- Phrase search: SELECT * FROM articles WHERE MATCH(title, body) AGAINST('"query performance"'); -- Exact phrase -- Weighted terms: SELECT… A close relative is AUTO_INCREMENT, which mySQL auto-generates sequential integer values for this column. Commonly used with PRIMARY KEY. A close relative is ENGINE, which specifies the MySQL storage engine. InnoDB (default) supports transactions and foreign keys. MyISAM is faster for read-heavy.