Bug #27810 | fulltext search hazardous | ||
---|---|---|---|
Submitted: | 13 Apr 2007 14:43 | Modified: | 13 Apr 2007 15:50 |
Reporter: | Cedric Billiet | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.1.9 & 3.23 | OS: | Any (winxp & redhat) |
Assigned to: | CPU Architecture: | Any | |
Tags: | fulltext |
[13 Apr 2007 14:43]
Cedric Billiet
[13 Apr 2007 15:50]
Cedric Billiet
it is not a bug but just a bad conception: fulltext is unusable! "In mysql, every correct word in the collection and in the query is weighted according to its significance in the collection or query. Consequently, a word that is present in many documents has a lower weight and if a word is rare, it has higher weight. So if a word is present in 50% of the rows in a table, a query searching for that word will result in 0 result. This, mysql terms as relevance. But for me, it resulted in incorrect results for a query."
[13 Apr 2007 19:03]
MySQL Verification Team
You can use use FT IN BOOLEAN MODE: mysql> SELECT * FROM articles WHERE MATCH (title,body) -> AGAINST ('database'); Empty set (0.00 sec) mysql> mysql> mysql> SELECT * FROM articles WHERE MATCH (title,body) -> AGAINST ('+database' IN BOOLEAN MODE); +----+-------------------+------------------------------------------+ | id | title | body | +----+-------------------+------------------------------------------+ | 1 | MySQL Tutorial | DBMS stands for DataBase ... | | 3 | MySQL vs. YourSQL | In the following database comparison ... | +----+-------------------+------------------------------------------+ 2 rows in set (0.00 sec) mysql>