Answering yesterday to some newsgroup question about MySQL I have answered about the problem of the full-text searches in natural language.
Create and populate of a simple table with a full-text index.
mysql> create table ft_test( -> id int not null auto_increment, -> string text, -> fulltext index(string), -> primary key(id)); Query OK, 0 rows affected (0.09 sec)
mysql> insert into ft_test(string) values('forza inter'),('inter'),('viva inter'),('scudetto'),('champions league'); Query OK, 5 rows affected (0.10 sec) Records: 5 Duplicates: 0 Warnings: 0
mysql> select * from ft_test; +----+------------------+ | id | string | +----+------------------+ | 1 | forza inter | | 2 | inter | | 3 | viva inter | | 4 | scudetto | | 5 | champions league | +----+------------------+
Let's try first a search using the full-text index.
…[Read more]