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?
 

Mike

XenForo developer
Staff member
With 100 million posts, you'd really need XF Enhanced Search and Elasticsearch. MySQL full text search won't cut it.
 

sajal

Active member
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?
 

Mike

XenForo developer
Staff member
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.
 

sajal

Active member
@Mike, thanks that makes sense, I'll try to do that and see how much time it takes as it's too have 100M records already.
 

sajal

Active member
@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.
 

Mike

XenForo developer
Staff member
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.
 
Top