Fulltext search on mysql with a 3 letter word

后端 未结 2 537
死守一世寂寞
死守一世寂寞 2021-01-17 22:56

I\'m trying to find \"the zen\" string in a field containing \"The Zen Circus\". I\'ve got a FULLTEXT index.

select url,name,
,   MATCH(name) AGAINST ( \'zen         


        
相关标签:
2条回答
  • 2021-01-17 23:26

    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 indexes.

    Remeber to restart and rebuild indexes.


    Edit
    Run show variables like 'ft_%'; to confirm that the word length matches what you set it to.

    0 讨论(0)
  • 2021-01-17 23:29

    Kao is right but that didn't help me at all - why? InnoDB table uses a different setting - try updating this one and checking it with:

        show variables like 'innodb_ft_min_token_size';
    
    0 讨论(0)
提交回复
热议问题