Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I change "ft_min_word_len" on shared hosting?

I have MySQL on shared hosting. Is there any way how to change value of ft_min_word_len without administrator access?

I found one workaround, where every word that has less than 4 characters is supplemented with _ or some other char, and the same is done with every searched keyword that is less than 4 characters.

Is there any better, or cleaner way to make Fulltext search work for short words?

like image 469
Jakub Arnold Avatar asked Jun 21 '09 18:06

Jakub Arnold


1 Answers

Unfortunately, ft_min_word_len is a global system variable and cannot be set dynamically: see MySQL's online docs. Changing it would mean rebuilding every FULLTEXT index around, btw, so you can see why they don't want non-admins to mess with it.

I fear your workaround (or something entirely equivalent) is the only way to solve the problem in your situation. Sorry! (But, compliments for thinking of it!).

like image 120
Alex Martelli Avatar answered Oct 19 '22 06:10

Alex Martelli