XF Search Engine

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?
 
What do you all think of the search functionality so far?

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 ...
 
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 !
 
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.
 
As mlx posted above, you would need to change the MySQL configuration file:

The minimum and maximum lengths of words to be indexed are defined by the ft_min_word_len andft_max_word_len system variables. (See Section 5.1.3, “Server System Variables”.) The default minimum value is four characters; the default maximum is version dependent. If you change either value, you must rebuild yourFULLTEXT indexes. For example, if you want three-character words to be searchable, you can set theft_min_word_len variable by putting the following lines in an option file:
[mysqld]
ft_min_word_len=3

http://dev.mysql.com/doc/refman/5.0/en/fulltext-fine-tuning.html
 
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.
 
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
Hi Jake,

Would I be better of setting up the sphinx search engine or leaving it as is and editing the my.cnf? Cheers
 
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?
 
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.

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!
 
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!
 
Top Bottom