Mysql – MariaDB Full Text Index – How to query old data as well

full-text-searchindexmariadbMySQL

I have added new full text index to mariadb

ALTER TABLE <table name> ADD FULLTEXT INDEX records

I can query against this index only newly added and updated records but for older records (which is added before this index) I cannot query

Is there any workaround that I can also fetch older records

Best Answer

normally it would be build, when you added the index

But you can OTIMIZE TABLE yourtablename

The fulltext index is only fully re-organized when an OPTIMIZE TABLE statement is run.