XF 1.5 Rebuild Index

sajal

Active member
I've around 100M post in xf_post table. What should be the proper way to rebuild the posts index?
 
With 100 million posts, you'd really need XF Enhanced Search and Elasticsearch. MySQL full text search won't cut it.
 
Thanks @Mike, I will study those two plugins, but atm I've site live and I updated the ft_min_word_length mysql variable from 3 to 4.

So do you think any quick way to rebuild xf_post, as I think from the back-end it would take couple of days for sure?
 
If you already have the data in the xf_search_index table and you just changed the ft_min_word_length, then you can just run this query:
Code:
REPAIR TABLE xf_search_index QUICK;
Note that it will lock the table while running, so you may need to close the site while it's running.

Otherwise, to insert into the search index requires the PHP process.
 
@Mike, a quick query here.

I changed ft_min_word_length in Mysql from 4 to 3. Do I MUST need to reindex
xf_search_index table?

Since, it seems that if I don't do that Mysql Replication is breaking.
 
You don't need to reindex within XF, but you do need to rebuild the full text indexes in MySQL:
Code:
REPAIR TABLE xf_search_index QUICK;
Should work.
 
Back
Top Bottom