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

[Tip] Search for 3 letter words by wrapping with asterisks (ie. for bug use *bug*)

Digital Doctor

Well-known member
#1
I stumbled upon a method of searching for 3 letter words here at xenforo.com

Forinstance if you try to search for:
bug

you'll get this error.
XenForo Community - Error
The search could not be completed because the search keywords were too short, too long, or too common.
however ....
*bug*

bug*
works ! (demo)
Hope that helps :)

Update: I see Forsaken mentioned this tip as well :)

3 letters do not work due to MySQL requiring a minimum of 4. You can bypass this by doing CMS* which will display results.
 

swatme

Well-known member
#7
oh i see.
whats the tradeoff of setting the min word length in my.cnf to zero?
will the mysql load usage increase?
 

digitalpoint

Well-known member
#8
Well it would certainly take more resources (memory and disk space) on your server the lower you set the min word length to, but not remarkably so. Personally, I stick with 3 character minimum because I don't really find a lot of 2 letter words I need to search for, and there are a LOT of them ("is", "it", "an", etc.) that creates a pretty big index. But I'm also dealing with 17,000,000+ posts, (and a ton of other searchable content types... PMs, users, etc.)

So in my case, the benefit of a 2 character minimum word length isn't greater than the resources required to maintain it, so I just forgo it.