Category: developers journal

mysql doesn’t like me! beware of mysql stopwords…

Author: seven February 13, 2008

Today we spent few hours debugging search for friends functionality on one of our new projects. To make story short, we had one really complex fulltext search query. Interestingly enough, I was searching for my self (seven) in database, and I was unable to find ANY reference to user seven.

Empty set (31 ms):

1 rows fetched (47 ms):
SELECT a FROM t WHERE name_nick like '%seven%';

1 rows fetched (47 ms):
SELECT * FROM t WHERE name_nick RLIKE '[[:<:]]seven[[:>:]]';

Be hold! MySQL Full-Text Stopwords.

You can get over this, by modifying mysql stopwords and recompiling from source (myisam/ft_static.c holds them), but I would rather not do that for now. We had to use fulltext search because like was just too damn slow for 5000+ users.

There is chance that this problem is to be fixed in future and it’s been tracked as initiative to remove Natural Language Full-Text Search limitations from boolean mode. Until then, if you want to be my friend… search for Neven! :)

CEO/CTO at Nivas®
Neven Jacmenović has been passionately involved with computers since late 80s, the age of Atari and Commodore Amiga. As one of internet industry pioneers in Croatia, since 90s, he has been involved in making of many award winning, innovative and successful online projects. He is an experienced full stack web developer, analyst and system engineer. In his spare time, Neven is transforming retro-futuristic passion into various golang, Adobe Flash and JavaScript/WebGL projects.

    One thought on “mysql doesn’t like me! beware of mysql stopwords…”

    Leave a Reply

    Your email address will not be published. Required fields are marked *