| Bug #6800 | 'WHERE MATCH (foo) AGAINST ("-bar" IN BOOLEAN MODE)' never matches anything | ||
|---|---|---|---|
| Submitted: | 24 Nov 2004 14:49 | Modified: | 22 Feb 2013 16:23 |
| Reporter: | Stig Brautaset | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: FULLTEXT search | Severity: | S4 (Feature request) |
| Version: | 4.0.20 | OS: | Linux (RedHat Linux 9.0) |
| Assigned to: | CPU Architecture: | Any | |
[22 Feb 2013 16:23]
Sveta Smirnova
Thank you for the feature request.

Description: The "MATCH ... AGAINST" construct fails to match anything at all if you are using IN BOOLOAN MODE and are only want to make sure that your resulting rows _don't_ have the given words. I.e, the current query will return 0 even if the table "foo" has several records where the "bar" column does not contain the word "quux": SELECT count(*) FROM foo WHERE MATCH(bar) AGAINST ("-quux" IN BOOLOEAN MODE); This has been noted before in the user comments (here: http://dev.mysql.com/doc/mysql/en/Fulltext_Boolean.html) but I could not find a bug listed. How to repeat: Perform any MATCH ... AGAINST query IN BOOLEAN MODE with an all-negative match set. Suggested fix: Please make 'WHERE MATCH (foo) AGAINST ("-term" IN BOOLEAN MODE)' work as expected by returning every row that do not have "term" in its "foo" field.