Before reaching for Elasticsearch, it’s worth knowing MySQL has built-in full-text search — genuinely capable for small-to-medium datasets, and one less service to operate.
-- Requires a FULLTEXT index
ALTER TABLE articles ADD FULLTEXT INDEX ft_content (title, body);
-- Natural language search, ranked by relevance
SELECT id, title, MATCH(title, body) AGAINST('database performance') AS relevance
FROM articles
WHERE MATCH(title, body) AGAINST('database performance')
ORDER BY relevance DESC
LIMIT 10;
-- Boolean mode: exact phrase, required/excluded terms
SELECT * FROM articles
WHERE MATCH(title, body) AGAINST('+mysql -oracle' IN BOOLEAN MODE);
MySQL’s full-text search won’t match Elasticsearch’s fuzzy matching, typo tolerance, or faceted search — but for a blog, product catalog, or documentation site under a few hundred thousand rows, it’s a genuinely reasonable choice that avoids standing up and syncing a separate search cluster.