MySQL Variables ngram_token_size 数据库 参数变量解释及正确配置使用
本站中文解释
ngram_token_size变量控制搜索内容中的文本词语的最大长度,用于字符函数的内容拆分,可以帮助字符函数更准确的理解字符模式。 默认情况下,此值设置为2,即文本词语的最大长度为2.
要设置此变量,可以使用以下语法:
SET GLOBAL ngram_token_size=3;
这意味着文本词语的最大长度将被设置为3.
官方英文解释
ngram_token_size
| Command-Line Format | --ngram-token-size=# |
|---|---|
| System Variable | ngram_token_size |
| Scope | Global |
| Dynamic | No |
| Type | Integer |
| Default Value | 2 |
| Minimum Value | 1 |
| Maximum Value | 10 |
Defines the n-gram token size for the n-gram full-text parser.
The ngram_token_size option is read-only
and can only be modified at startup. The default value is 2
(bigram). The maximum value is 10.
For more information about how to configure this variable, see
Section 12.10.8, “ngram Full-Text Parser”.