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

XF 1.1 Disabling search disables mysql fields ?

Discussion in 'XenForo Questions and Support' started by Weppa333, Sep 12, 2013.

  1. Weppa333

    Weppa333 Active Member

    Hi members & team;

    Juste a quick question : I disabled search on my board ( GCSE is enough for me ), but before starting an import, I wonder if disabling search like I did also "disables" any potential memory consuming MySQl index (fulltext, etc) or search fields that I don't need ?

    So basically, if I import a lot of threadsd after disabling search, am I 100% sure that Mysql does not store irrelevant search related indexes or fields ?

  2. Mike

    Mike XenForo Developer Staff Member

    Information is always indexed for the search.
  3. Weppa333

    Weppa333 Active Member

    So disabling search disables the search box basically, nothing else ?

    Then, performance-wise, an XF board "with or without the search activated" behaves exactly the same :( - which is obviously not the result I expect in my case ; I would like my board to perform better without the search than with it...
    (which was how vb3.6 worked iirc)
  4. Mike

    Mike XenForo Developer Staff Member

    You would need to modify the code to get the behavior you want. The majority of performance overhead usually comes from actual searches being done, rather than indexing small amounts of data a ta time.
  5. Weppa333

    Weppa333 Active Member

    If that's not too much to ask, could you simply point me to the file to modifiy ?
    I can probably figure out what to remove.

    The problem is not really indexing, the problem is having a database full of I don't know what ( i'll figure out by looking at the code) that clutters mysql memory , backup, open tables, etc and that I absolutely will not ever use.
  6. Weppa333

    Weppa333 Active Member

    Is XF search using
    - mysql fulltext indexing (in combination with other stuff eventually)
    - only a specific table and records created by XF that has nothing to do with Mysql indexes ?

    If that's (2) I can simply flush the search data from time to time...
    If that's (1) I absolutely have to disable indexing and modify the index definitions.

    We're speaking about million of posts. My current VB post DB is 2Gigs, without indexes.
  7. Chris D

    Chris D XenForo Developer Staff Member

    You should be safe enough to just truncate the xf_search_index table from time to time.

    Arguably, however, it's still very little overhead to concern yourself with.

    Unless you're very concerned about overall disk usage, in which case the size of the xf_search_index table is usually roughly equal to the sum of the size of your threads, posts table etc. because effectively the content is duplicated in there.

    So if disk space is a major concern, truncating the table will be effective.
  8. Weppa333

    Weppa333 Active Member

    My worst nightmare is mysql fulltext index : it's a total piece of garbage, especially in languages other than english, it's a ressource hog, and it's not even effective for searching
  9. Mike

    Mike XenForo Developer Staff Member

    The indexing is handled by XenForo_Search_SourceHandler_MySqlFt.
  10. Weppa333

    Weppa333 Active Member

    thanks Mike,

    Might be a good idea (but it's up to you of course) to add a flasg in that class so that it does not index anymore when search is de-activated.
    I believe this is what people expect.
  11. Chris D

    Chris D XenForo Developer Staff Member

    I have experienced no resource issues with XenForo searching, even though we actually use it and don't disable it. Nor have I seen similar reports from others. Those that want a little bit more out of their search capability, especially for bigger boards, it is recommended to use the Enhanced Search add-on.

    This isn't vBulletin. At least try something new before tarring it with the same brush.
  12. Weppa333

    Weppa333 Active Member

    I have to admit that built-in search is something I disable even before using it. And that is indeed a VB traumatism.
    Although I'm not sure I need to receive sarcastic comments for that, as I believe I try to be a gentleman in my posts here.
  13. Chris D

    Chris D XenForo Developer Staff Member

    I wasn't being sarcastic. It was an observation.

    You're assuming that the XenForo search is a resource hog based on your experience with another piece of software.
  14. Weppa333

    Weppa333 Active Member

    Just a word about search in general ; sometimes it's not simply worth the hassle. Of course if your content is invaluable things might be different (but who's got millions of invaluable posts ?) but in my case, it's probably >50% chit-chat, so assigning huge resources to the built in search is expensive I still have to pay the bills for the server able to handle such a huge table, and in my case it's not cheap at all.

    So it's also a business decision not to use built in search.
    Maybe elastic search is a trade-off. But I'm sure there's storage and CPU power needed over there too. I currently use Sphinx for VB and again, it's not worth the hassle. People use google anyway. So I decided to shut it off entirely.

    About built-in search's performance, I swear I'll give it a try before removing the plug.

    This is just user feedback :)
  15. Weppa333

    Weppa333 Active Member

    @Chris Deeming it's difficult to grasp sarcasm when you're not a native speaker, just wanted to say how I felt about the comment... Other wise these things pile up... If it's not meant to be rude, let's forget about it. I've got enough conflicts on my boards -- like all of us :) :)

Share This Page