FULLTEXT is a MySQL index type and table constraint that enables full-text search capabilities. When you add a FULLTEXT index to one or more text columns, MySQL tokenizes and stores each word in an internal inverted index. Queries that use MATCH ... AGAINST can then locate rows that contain or closely match search terms, returning relevance scores ordered by how well each row matches. FULLTEXT works in natural language, boolean, or query-expansion modes. It only supports InnoDB and MyISAM tables, requires the columns to use a supported character set, and ignores words shorter than the minimum length (default 3) or present in the stopword list. Although similar to PostgreSQL's full-text search, FULLTEXT is proprietary to MySQL and has its own syntax and limitations.
index_name
(Identifier) - Optional name for the FULLTEXT indexcolumn_list
(List) - One or more CHAR, VARCHAR, or TEXT columns to indexWITH PARSER parser_name
(Identifier) - Optional parser plugin for custom tokenizationMATCH, AGAINST, LIKE, B-tree index, BOOLEAN MODE, PostgreSQL tsvector
MySQL 3.23
UTF8, UTF8MB4, and other multibyte character sets are fully supported as long as the server has the necessary parser.
Decrease the system variable ft_min_word_len (or innodb_ft_min_token_size for InnoDB) and rebuild the index so that two-letter words are indexed.
Yes. Each insert, update, or delete on indexed columns triggers index maintenance. For heavy write workloads, consider batching inserts or using delayed indexing.
MySQL uses term frequency-inverse document frequency (TF-IDF) under the hood, then normalizes the value so the highest matching row gets the largest score.