Search code examples
phpmysqlinnodbfull-text-indexing

How do I add a column to an existing FULLTEXT index?


I created a FULLTEXT index on a table in a MySql database, and left out a column when I did so. I have been trying to figure out how to add this column so that it can be searched against along with the other columns in this table that have already been indexed.

I have searched SO and the web, but am not getting anywhere. I tried going into phpMyAdmin, and when you click on the table and then look at the structure, all the way on the right there is a dropdown that says "More." This has a "Fulltext" option that seems to add fulltext indexing to the column, so I did this, but it is still not allowing me to search the column.

Did I add FULLTEXT to this column? Either way, how do I get this to work?


Solution

  • ALTER TABLE foo DROP FULLTEXT old_ft_index_name, ADD FULLTEXT(this, that);