Di default un indice FULL TEXT è creato per effettuare una ricerca con un minimo di 4 parole, in alcuni casi è utile poter abbassare questo limite facendo però bene attenzione alle prestazioni.
Il parametro da utilizzare è ft_min_word_len da impostare nel file di configurazione di MySQL. Impostare questo parametro sotto al 4 può far decadere le prestazioni, anche se in alcuni casi è necessario, soprattutto in delle operazioni di back-end.
Command-Line Format |
--ft_min_word_len=# |
||
Option-File Format |
ft_min_word_len |
||
System Variable Name |
ft_min_word_len |
||
Variable Scope | Global | ||
Dynamic Variable | No | ||
Permitted Values | |||
Type |
numeric |
||
Default |
4 |
||
Min Value |
1 |
The minimum length of the word to be included in a FULLTEXT
index.
FULLTEXT
indexes must be rebuilt after changing this variable. Use REPAIR TABLE
.tbl_name
QUICK
E' semplicemente necessario impostarlo al valore desiderato è ricreare l'indice.