Reputation: 503
With MySQL Boolean Full-Text Searches...
http://dev.mysql.com/doc/refman/5.1/en/fulltext-boolean.html
A leading minus sign indicates that this word must not be present in any of the rows that are returned.
Note: The - operator acts only to exclude rows that are otherwise matched by other search terms. Thus, a boolean-mode search that contains only terms preceded by - returns an empty result. It does not return “all rows except those containing any of the excluded terms.”
Is there any way to do a search giving all rows except those that contain any of the excluded terms?
like (+* -blah -blah2)
Upvotes: 1
Views: 1435
Reputation: 536587
No, but it would be equivalent to simply NOT
the condition:
SELECT *
FROM foo
WHERE NOT MATCH (bar) AGAINST ('blah blah2')
of course such a query can't possibly actually use the fulltext index for quick lookup.
Upvotes: 2