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

        http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html


"... 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.

        steve

--
+--------------- my people are the people of the dessert, ---------------+
| Steve Edberg                                http://pgfsun.ucdavis.edu/ |
| UC Davis Genome Center                            [EMAIL PROTECTED] |
| Bioinformatics programming/database/sysadmin             (530)754-9127 |
+---------------- said t e lawrence, picking up his fork ----------------+

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to