Nobody notice that search doesn't work?

Posted by anarki 
Nobody notice that search doesn't work?
October 06, 2011 05:31AM
It only works when you type all the title words or author name, it has to be exact the words. How to fix it?
Re: Nobody notice that search doesn't work?
October 06, 2011 05:37AM
let's use this thread as an example, if you search "nobody", you won't find it nor with "Nobody", however, you can find it with "search" or "work".

This search function is worse with chinese words, basically, I cannot find anything except typing all the exact words.
Re: Nobody notice that search doesn't work?
October 06, 2011 05:46AM
For Chinese, full text search is not a useful feature. In the Phorum config file, ft_search can be disabled, making the search for Chinese a lot more useful.

For 'nobody', you are looking at a MySQL quirk. MySQL full text searching does make use of a list of stop words. The stop words are not included in the search data by default. For a list of stopwords see this MySQL manual page.
The administrator of the MySQL server can disable the stop word behavior by using the following in the my.cnf configuration file:

[mysqld]
ft_stopword_file = ""

After setting this option and restarting the MySQL server, the search index needs to be rebuilt. In the admin interface, there is an option for that below the database integrity menu item. After rebuilding the search index, searching for 'nobody' or other stop words should work as well.

Futhermore, note that MySQL also uses a max word length for full text indexing. Words that are shorter than this length are ignored as well. If you have troubles searching for short words, then the MySQL server admin can set ft_min_word_len= 2 for example to use a different minimal word length. A server restart + search index rebuild operation are needed for this too.

When you have no willing MySQL admin at hand, then you can always switch to non-full-text search in the Phorum config file. Note however that for a big board this might slow down the search speed.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Nobody notice that search doesn't work?
October 06, 2011 05:58AM
Thanks for this fast reply.

Well, this should not be complicated as you stated. I've been using different forums, they all have no problem with this issue. and I don't think all just because of their administrators did something as you said with their mysql server. It shouldn't be.
Re: Nobody notice that search doesn't work?
October 06, 2011 06:09AM
Well, if you are talking about other forum packages: not all packages use the full text search features of MySQL. When using basic queries for doing the search (like you do in Phorum by disabling ft_search in the config), then this is not an issue by default. We chose use full text, simply because it will scale better for larger forums, but things like the mentioned mysqld settings might result in unexpected behavior at times.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Nobody notice that search doesn't work?
October 06, 2011 06:16AM
let us focus on english first. keyword "Nobody" is english, and it shows in the title of this post, you mean if we are using full text, we cannot get the result?
Re: Nobody notice that search doesn't work?
October 06, 2011 06:18AM
I you take a look at the MySQL page that I linked, you will see that MySQL considers it a stop word. So yes, "nobody" will be ignored in the search because of that. If you think that word should not be in the stop word list, then you'll have to talk to the people that develop MySQL. If you want to work around it, then you have to switch to non-full-text search or get the MySQL server administrator to disable the stop word list in the server altogether.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Nobody notice that search doesn't work?
October 06, 2011 06:22AM
get your point, just happened, I picked a special word, no luck. thank you, new to this forum, will see if any other issues.
Re: Nobody notice that search doesn't work?
October 06, 2011 06:23AM
btw, "zero" is also a stop word? the thread below this starts with "zero", and I searched it, no result.
Re: Nobody notice that search doesn't work?
October 06, 2011 06:24AM
Like I said, you can find the list at the MySQL site.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Nobody notice that search doesn't work?
October 06, 2011 06:27AM
okay, you teach me something today, thanks again and again.
Sorry, only registered users may post in this forum.

Click here to login