我可以更改“ft_min_word_len”吗?共享托管? [英] Can I change "ft_min_word_len" on shared hosting?

查看:650
本文介绍了我可以更改“ft_min_word_len”吗?共享托管?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在共享主机上安装了MySQL。有没有办法改变 ft_min_word_len 的值而无需管理员权限?

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

我找到了一种解决方法,其中每个单词只有少于4个字符的补充了_或其他字符,并且每个搜索的关键字都少于4个字符。

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.

有没有更好的,或 cleaner 的方式来使全文搜索工作的短词?

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

推荐答案

不幸的是,ft_min_word_len是一个全局系统变量,不能动态设置:请参阅 MySQL的在线文档。改变它意味着重建每一个 FULLTEXT 索引,因此你可以看到为什么他们不希望非管理员混淆它。

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!).

这篇关于我可以更改“ft_min_word_len”吗?共享托管?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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