Rebuilding Full-Text Indexes
After changing stopwords or token size configuration, drop and recreate all full-text indexes to apply the new settings.
After changing stopwords or token size configuration, drop and recreate all full-text indexes to apply the new settings.
-- Drop full-text index
ALTER TABLE articles DROP INDEX idx_search;
-- Recreate with new settings
ALTER TABLE articles ADD FULLTEXT idx_search (title, body);
-- Alternatively
DROP INDEX idx_search ON articles;
CREATE FULLTEXT INDEX idx_search ON articles (title, body);
Dropping and recreating a full-text index can take time on large tables — plan for downtime.