Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Fulltext Stopwords Rationale

I am currently trying to develop a basic fulltext search for my website, and I noticed that certain words like "regarding" are listed as stopwords for MySQL fulltext searches. This doesn't bother me too much right now since people searching for a given news item wouldn't necessarily search using the word "regarding" (but I certainly can't speak for everyone!). However, I was hoping someone here could enlighten me about the rationale for having a stopwords list. Thanks!

For Clarification: I'm using MyIsam for my fulltext table. The stopwords are words that MySQL won't index (for any fulltext index). As noted in a comment to this question, there is a full list of stopwords without any kind of explanation. I'd just like to know if there was a rationale behind the words "they" chose.

like image 299
just_wes Avatar asked Feb 23 '10 18:02

just_wes


1 Answers

The stop words are just common words in the English language. In most cases, your search results will be more relevant -- and your indices will be smaller and faster -- if you don't index these words.

You can edit the stop word list using the ft_stopword_file variable (or set it to '' to index all words as long or longer than ft_min_word_len) if that suits your needs better. You can also change the minimum indexed word length using the ft_min_word_len variable, which exists for the same reason.

like image 172
Ike Walker Avatar answered Sep 24 '22 19:09

Ike Walker