Working with Full-Text Search
On this page
Full-text search allows you to search for words or phrases in a large body of text efficiently.fuzzy
and performed over the text types CHAR, VARCHAR, TEXT, and LONGTEXT.
Overview
Full-text indexes are only supported on columnstore tables.CREATE TABLE query using the FULLTEXT index type.
CREATE TABLE <table_name> (FULLTEXT [<fts_index_name>] (<fts_col>))
Content in columns that are full-text indexed can be searched using the MATCH function.MATCH clause applies to only one table.MATCH clauses.
If an index name was not designated when creating the table, the full-text index key_ must be used when dropping the index.key_ is displayed when the SHOW INDEXES FROM <table_ command is executed.
Full-text search may not be used inside a CTE (WITH (Common Table Expressions)) because the CTE produces a dynamic table which does not have a full-text index.
During indexing, column values are split into tokens, which are turned into indexed terms.
Note
New inserts and updates into columnstore tables may initially be stored in a hidden rowstore table before being flushed to a segment file.
In that case, the full-text index in the columnstore will be updated asynchronously for new inserts and updates.OPTIMIZE TABLE <table_ command.
Since an index is created for each segment file, the distribution of words within the segment may affect the score of full-text queries, especially when the segments have very few rows and the columns have very few words.
Index Repair
Full-text index creation failure is rare.ER_.OPTIMIZE TABLE <tablename> FIX_.
Related Topics
-
Working with Vector Data- Allows for semantic searching, which is searching based on meanings, not keywords.
-
Hybrid Search - Allows full-text and vector search methods in one query.
Full-text and vector search ranking can be combined. -
Training: Full-Text Index and Search
Last modified: March 26, 2026