时间:2021-07-01 10:21:17 帮助过:25人阅读
|
The issue was that all of the fine tuning I had done before was limited to MyISAM, so it didn’t affect InnoDB. In the past I configured MySQL FULLTEXT search to index words as short as 1 character (the default is 3), and to index common words (not to use any stopword list). These are the relevant variables I set in in my.cnf:
|
InnoDB has its own variables to control stopwords and minimum word length, so I needed to set these variables when I changed the tables from MyISAM to InnoDB:
|
Since those variables are not dynamic, I had to restart MySQL for them to take effect. Furthermore, I needed to rebuild the FULLTEXT indexes on the relevant tables. This is howthe manualinstructs you to rebuld the indexes:
To rebuild the FULLTEXT indexes for an InnoDB table, use ALTER TABLE with the DROP INDEX and ADD INDEX options to drop and re-create each index.
Rather than drop and recreate the indexes, I just usedALTER TABLE ... FORCE
to rebuild the table (and indexes), like this:
|
After making those changes I re-ranpt-upgrade
, and now I am getting the same set of rows back from MyISAM and InnoDB. The order of the rows is slightly different in some cases, but as I mentioned yesterday that isexpected behavior.