1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Very slow search index rebuild

Discussion in 'Troubleshooting and Problems' started by Nnirvi, Mar 4, 2014.

  1. Nnirvi

    Nnirvi Member


    After a successful import, I've tried to rebuild the search index. Yesterday I started it pretty late and forum had around 60 active users at that moment. It started nicely but came to a crawl couple of hours later after indexing 1,5M messages.

    This morning I cancelled it (it had made no significant improvement from 1,5M overnight) and started again, this time with a delay of 1 second. Again, it started nicely (this time forum was almost empty) and now it's taking 20 seconds per 500 messages.

    Any ideas?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    CyclingTribe likes this.
  3. RoldanLT

    RoldanLT Well-Known Member

    You should optimize your mysql config.
    Make use of Innodb. Specifically, optimize Innodb.
  4. Mike

    Mike XenForo Developer Staff Member

    Alternatively, if you really do want to continue with MySQL in this case (not really recommended), you will want to run:

    ALTER TABLE xf_search_index DISABLE KEYS;

    Rebuild the index and when it's complete run:

    ALTER TABLE xf_search_index ENABLE KEYS;

    This will cause MySQL to build the full text index in bulk so the insert will be much faster, though note that it could take some time to enable keys there.
    lazy llama, p4guru and CyclingTribe like this.
  5. Nnirvi

    Nnirvi Member

    Ok, thanks for the tips!
  6. Nnirvi

    Nnirvi Member

    Enhanced search requires Elasticsearch, is this possible to install without root access to the server?
  7. RoldanLT

    RoldanLT Well-Known Member

  8. Nnirvi

    Nnirvi Member

    Ok, I'll just try Mike's method then. Thanks!

Share This Page