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

Prevent search tables from being populated when search is disabled

Discussion in 'XenForo Questions and Support' started by Darfuria, Mar 30, 2011.

  1. Darfuria

    Darfuria Active Member

    Is it necessary for the search tables to be populated when search is disabled on XF? If so, is there any way of preventing this from happening?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I suppose if storage space is a problem then you could free up some space by removing the search index records. Or you could buy more storage from your host which is usually very cheap.

    In my testing I found that XenForo maintains the search index records even if the search engine is disabled. I don't see an option disable this.

    You can always manually empty the search index from time to time with this query:

    Code:
    TRUNCATE TABLE xf_search_index;
    
    Then you can rebuild the search index if you ever decide to use the search feature:

    Admin CP -> Tools -> Rebuild Caches -> Rebuild Search Index
     
  3. Onimua

    Onimua Well-Known Member

    Is doing such a thing intensive?
     
  4. James

    James Well-Known Member

    @Onimua, just set it up as a cron job to run every day at some stupid time when nobody ever visits your site (3/4/5am?)
     
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The query isn't intensive.

    The rebuild is intensive, but that only needs to be done once if you decide to use the search feature at a later time.
     
    Dean likes this.

Share This Page