Re: A glaring bug in FULLTEXT search?
"Matt W" <[email protected]>
| Newsgroups | gmane.comp.db.mysql.bugs |
|---|---|
| Message-ID | <005501c39a04$89d30300$0100a8c0@pc1> |
Hi Ivan,
No, definitely not a bug. Did you read this page from the manual,
http://www.mysql.com/doc/en/Fulltext_Search.html? Words that are present
in more than half the rows are ignored when not using IN BOOLEAN MODE.
You need at least 3 rows for a non-boolean search to work. Additionally,
"some" and "other" are stopwords, so they're also ignored.
This query would work as expected with your test data:
SELECT * FROM test WHERE MATCH (name) AGAINST ('words' IN BOOLEAN MODE);
Hope that helps.
Matt
----- Original Message -----
From: "Ivan Todoroski"
Sent: Friday, October 24, 2003 2:20 AM
Subject: A glaring bug in FULLTEXT search?
>
> Here's a transcript of my chat with mysql:
>
> ----------------------
> mysql> create table test (id int, name text, fulltext nameidx(name))
> type=MyISAM;
> Query OK, 0 rows affected (0.10 sec)
>
> mysql> insert into test values (1, 'some words');
> Query OK, 1 row affected (0.06 sec)
>
> mysql> insert into test values (2, 'other words');
> Query OK, 1 row affected (0.00 sec)
>
> mysql> select * from test;
> +------+-------------+
> | id | name |
> +------+-------------+
> | 1 | some words |
> | 2 | other words |
> +------+-------------+
> 2 rows in set (0.10 sec)
>
> mysql> select * from test where match(name) against('word');
> Empty set (0.02 sec)
>
> mysql> select * from test where match(name) against('words');
> Empty set (0.00 sec)
>
> mysql> select * from test where match(name) against('some');
> Empty set (0.00 sec)
>
> mysql> select * from test where match(name) against('other');
> Empty set (0.00 sec)
> -------------------------------
>
> Is this a bug or am I misunderstanding how FULLTEXT search is supposed
to work?
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/[email protected]