SyntaxStudy
Sign Up
MySQL Full-Text Index Introduction
MySQL Beginner 3 min read

Full-Text Index Introduction

Full-Text Indexes

Full-text indexes enable natural language search across text columns. They are far faster than LIKE '%word%' and support relevance ranking.

Example
CREATE TABLE articles (
  id INT AUTO_INCREMENT PRIMARY KEY,
  title VARCHAR(255),
  body TEXT,
  FULLTEXT(title, body)
);

-- Or add to existing table
ALTER TABLE articles ADD FULLTEXT idx_search (title, body);
Pro Tip

Full-text indexes work on InnoDB (MySQL 5.6+) and MyISAM tables.