如何修复3个字符的全文搜索? [英] how do I fix full text search for 3 characters?

查看:228
本文介绍了如何修复3个字符的全文搜索?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用了全文搜索mysql。我的代码是
select * from uh_property WHERE match(fieldname)against('serach_word')

现在,当我输入三个字符的搜索记录时, 。例如,我有名为'eco'的记录。当我在搜索的文本框中输入eco时,不显示任何记录。



我发现全文搜索的最小字符数是4.是否有解决这个问题的方法?

解决方案

请参阅微调MySQL全文搜索。您首先需要为InnoDB表更改
ft_min_word_len (或 innodb_ft_min_token_size ),然后重新生成全文搜索索引。


I have used full text search mysql. My code is select * from uh_property WHERE match(fieldname) against('serach_word')

Now when i type word of three character search record is not displayed. For example i have record with name 'eco'. When i type eco in text box for search no record displayed.

I found that minimum character for full text search is 4. Is there anyway to solve this problem?

解决方案

Please see Fine-Tuning MySQL Full-Text Search. You first need to change ft_min_word_len (or innodb_ft_min_token_size for InnoDB tables) and then rebuild the fulltext search indexes.

这篇关于如何修复3个字符的全文搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆