List:General Discussion« Previous MessageNext Message »
From:Steve Edberg Date:June 30 2007 4:59pm
Subject:Re: Problem about fulltext search.
View as plain text  
At 11:23 PM +0800 6/30/07, Niu Kun wrote:
>Dear all,
>I'm planning to add fulltext search to my database.
>I've got the following test command:
>create table test(id int, name varchar(20));
>alter table test add fulltext(name);
>insert into test values(1,"hello world");
>insert into test values(1,"hello");
>When I execute the fulltext search command, I've got the following.
>mysql> select * from test where match(name) against("hello");
>Empty set (0.00 sec)
>Would anyone be kind enough to tell me how I can find hello in my text?
>Any help would be appreciated.
>Thanks in advance.

To quote from

"... words that are present in more than 50% of the rows are 
considered common and do not match."

'hello' appears in both (100%) of your records above, so it will not 
match. You need to insert more test data before MySQL has enough 
words to compute valid relevances.


+--------------- my people are the people of the dessert, ---------------+
| Steve Edberg                       |
| UC Davis Genome Center                            sbedberg@stripped |
| Bioinformatics programming/database/sysadmin             (530)754-9127 |
+---------------- said t e lawrence, picking up his fork ----------------+
Problem about fulltext search.Niu Kun30 Jun
  • Re: Problem about fulltext search.Steve Edberg30 Jun
    • Re: Problem about fulltext search.Niu Kun1 Jul
  • Re: Problem about fulltext search.Octavian Rasnita30 Jun
    • Re: Problem about fulltext search.Niu Kun1 Jul
  • Re: Problem about fulltext search.ViSolve DB Team2 Jul
    • Re: Problem about fulltext search.Kun Niu2 Jul