Nobody notice that search doesn't work?
Posted by anarki
|
Nobody notice that search doesn't work? October 06, 2011 05:31AM |
Registered: 15 years ago Posts: 10 |
|
Re: Nobody notice that search doesn't work? October 06, 2011 05:37AM |
Registered: 15 years ago Posts: 10 |
|
Re: Nobody notice that search doesn't work? October 06, 2011 05:46AM |
Admin Registered: 22 years ago Posts: 8,532 |
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:
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
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 |
Registered: 15 years ago Posts: 10 |
|
Re: Nobody notice that search doesn't work? October 06, 2011 06:09AM |
Admin Registered: 22 years ago Posts: 8,532 |
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
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Nobody notice that search doesn't work? October 06, 2011 06:16AM |
Registered: 15 years ago Posts: 10 |
|
Re: Nobody notice that search doesn't work? October 06, 2011 06:18AM |
Admin Registered: 22 years ago Posts: 8,532 |
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
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Nobody notice that search doesn't work? October 06, 2011 06:22AM |
Registered: 15 years ago Posts: 10 |
|
Re: Nobody notice that search doesn't work? October 06, 2011 06:23AM |
Registered: 15 years ago Posts: 10 |
|
Re: Nobody notice that search doesn't work? October 06, 2011 06:24AM |
Admin Registered: 22 years ago Posts: 8,532 |
Like I said, you can find the list at the MySQL site.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Nobody notice that search doesn't work? October 06, 2011 06:27AM |
Registered: 15 years ago Posts: 10 |
Sorry, only registered users may post in this forum.