Warning: Cannot modify header information - headers already sent by (output started at /var/www/lalieno.it/index.php:48) in /var/www/lalieno.it/inc/cookie.php on line 3
a cadenza discontinua
Come se fossi
BLOG

MySQL - Impostare il numero minimo di parole per l'indice FULLTEXT



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.

ft_min_word_len

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.

Note

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.


di GuiZ
05/09/2013

Commenta

We'll never share your email with anyone else.