Full-Text + Regular Filters
Combine MATCH AGAINST with regular WHERE conditions to narrow results by category, date, or other fields.
Combine MATCH AGAINST with regular WHERE conditions to narrow results by category, date, or other fields.
SELECT id, title, published_at
FROM articles
WHERE MATCH(title, body) AGAINST('indexing')
AND category_id = 3
AND published_at >= '2024-01-01'
ORDER BY MATCH(title, body) AGAINST('indexing') DESC
LIMIT 20;
MySQL applies the MATCH condition first (using the FT index), then filters by other conditions.