Full-text mysql search with three-letter word

I am trying to find the string "zen" in the field "Zen Circus". I have a FULLTEXT index.

select url,name, , MATCH(name) AGAINST ( 'zen*' IN BOOLEAN MODE) as A , MATCH(name) AGAINST ( '"the zen*"' IN BOOLEAN MODE) as B , MATCH(name) AGAINST ('>the* zen' IN BOOLEAN MODE) as C , MATCH(name) AGAINST ('thezen*' IN BOOLEAN MODE) as D , MATCH(name) AGAINST ('cir*' IN BOOLEAN MODE) as E , MATCH(name) AGAINST ('circus*' IN BOOLEAN MODE) as F from pages where url='thezencircus' 

I have this result:

 url = thezencircus name = The Zen Circus A = 0 (why?) B = 0 (why?) C = 0 (why?) D = 0 (ok) E = 1 (ok) F = 1 (ok) 

I also added ft_min_word_len = 2 in the msyql configuration file.

Any idea?

+6
source share
1 answer

See this answer. MySQL full text search for words with three or less letters.

[mysqld]
ft_min_word_len = 3
Then you must restart the server and rebuild your FULLTEXT indices.

Repeat reboot and rebuild indexes.


Edit
Run show variables like 'ft_%'; to confirm that the word length matches the one to which you set it.
+9
source

All Articles