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

XF Search Engine

Discussion in 'XenForo Pre-Sales Questions' started by Hornstar, Aug 4, 2010.

  1. Hornstar

    Hornstar Well-Known Member

    First thread here ^^

    Anyway I was just testing out the search Engine here on XF. Comparing it to VB and hoping it is better.

    I thought I would search for 'seo' as that was a topic of interest ^^

    Unfortunately it came back with: "The search could not be completed because the search keywords were too short, too long, or too common."

    I was wondering are there improvements yet to be made to the search engine here or is this just one of those things that can't be fixed?

    What do you all think of the search functionality so far?
     
  2. KURTZ

    KURTZ Well-Known Member

    simply, for my experience, the users don't like the search tools ... you must teach them for this ... so that trouble for me isn't very important ... also you can try to put in your board a similar threads feature, it's the same thing, the users just ignore it ...
     
  3. Floris

    Floris Guest

    Full Text MySQL search is what it is using. And works fine for me, but it's not a big forum yet, time will tell, also when I have more experience with it than I do now.

    Hey hornstar :) Welcome to XF !
     
  4. mlx

    mlx Well-Known Member

    I think the default minimum word length for MySQL full text indexes is 4 characters. I guess that's why there's no match for "seo".

    If you have root access you can change that in your my.cnf though.

    Or you could use Sphinx and fine tune your sphinx.conf.
     
  5. jacko

    jacko Active Member

    Is there any way to make xenforo search for words 3 characters long?

    I would like to be able to search for strings like: "ssl eq" or "dbx 160"
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    As mlx posted above, you would need to change the MySQL configuration file:

    http://dev.mysql.com/doc/refman/5.0/en/fulltext-fine-tuning.html
     
  7. jacko

    jacko Active Member

    what about "ssl eq" or "dbx 160"? these strings are longer than 3 characters
     
  8. Marc

    Marc Well-Known Member

    Suppose it depends on the kind of forum as to whether the 4 char limit would be an issue. I can def see the issue on forums such as this and tech related forums where they are plenty of 3 char keywords like php, sql, net, xml etc but I wouldnt have thought it would be an issue for most. Personally I dont mind the search on here at all.
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

    It's a pretty big problem on my forum due to all the TLA's :D

    FIA, WDC, WCC, etc.
     
    Marc likes this.
  10. Marc

    Marc Well-Known Member

    LMFAO ... Ok, good call LOL
     
  11. dieketzer

    dieketzer Well-Known Member

    the 4 letter thing can be annoying for sure.
    just today i was wanting to search '/ip-1/' and found i couldnt.
    thankfully google can (although it found nothing)
     
  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    In addition to that, you will probably need to restart the MySQL server and rebuild your search index after making the change:

    Admin CP -> Tools -> Rebuild Caches -> Rebuild Search Index
     
    Marcus and Dean like this.
  13. ddmmh

    ddmmh Well-Known Member

    Hi Jake,

    Would I be better of setting up the sphinx search engine or leaving it as is and editing the my.cnf? Cheers
     
  14. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Fulltext is easier, unless you need sphinx.
     
    Darkimmortal and Dean like this.
  15. TimWF

    TimWF Active Member

    Are the above instructions on how to enable three character search still valid? Or is there something beyond what is stated here, possibly a Xenforo setting of some sort?
     
  16. Kier

    Kier XenForo Developer Staff Member

    While using MySQL FullText, it is not possible for XenForo to set a character limit smaller than that specified by the MySQL configuration. You would need to follow the instructions posted above.
     
  17. TimWF

    TimWF Active Member

    Thanks Kier, to clarify though, is there any setting in XenForo that must be changed manually after making those MySQL setting changes? In our case we have made MySQL fulltext char limit min changes, re-indexed, etc. and we don't see the results we expect. Thanks again!
     
  18. Mike

    Mike XenForo Developer Staff Member

    Looks like there's a minimum word length setting in library/XenForo/Search/SourceHandler/MySqlFt.php (line 20). That should be pulled from an option I think.
     
  19. TimWF

    TimWF Active Member

    Excellent, thanks Mike, that did the trick editing that value there. :)

    I'll also submit a change request based on this as it is a bit problematic to have that as a hard coded setting, it would be great to have it as something set in the admin are so that it doesn't need to be altered whenever that file is overwritten in an upgrade.

    Thanks again!
     
  20. Dean

    Dean Well-Known Member

    Comment out or delete this line?

    protected $_minWordLength = 4;
     

Share This Page