SyntaxStudy
Sign Up
MySQL Multi-Column Full-Text Search
MySQL Intermediate 4 min read

Multi-Column Full-Text Search

Multi-Column Search

A single full-text index can cover multiple columns. MySQL weights matches in different columns equally by default (title matches carry no automatic extra weight).

Example
-- Index both title and body
ALTER TABLE articles ADD FULLTEXT idx_ft (title, body);

-- Search across both columns
SELECT id, title
FROM articles
WHERE MATCH(title, body) AGAINST('performance tuning')
ORDER BY MATCH(title, body) AGAINST('performance tuning') DESC;
Pro Tip

To weight title matches higher, use separate indexes and combine scores with arithmetic.