
更新下:
如果 wildcard 只出现在词组最后,也就是:
match(xxx) against('+key1 +key2*' in boolean mode)
不要求每一个词后面都带 wildcard:
match(xxx) against('+key1* +key2*' in boolean mode)
而且搜出来的结果不多的话,可以考虑用like作二次过滤:
select xxx from (
select xxx from t where match(xxx) against('+key1 +key2*' in boolean mode)
) as s
where s.xxx like '%key1 key2%'
1 simapple 2020-01-02 15:21:52 +08:00 也算不上 bug, 你搜索 helloworld* 就好了,不要留出空格 |
2 reidxx 2020-01-02 15:40:28 +08:00 楼主用 mysql 的全文索引怎么处理中文问题的? |
3 wangyzj 2020-01-02 16:31:21 +08:00 我觉得你要用 mysql fulltext 就别太纠结他的分词把 或者自己挂一个分词插件 |
4 div class="sep3"> xianyu0 OP |
5 klaudy 2020-01-03 08:44:47 +08:00 via Android mysql 正则表达式 |