MySQL Forums
Forum List  »  Full-Text Search

Problem with FULLTEXT - how to exclude the only search word?
Posted by: James H
Date: October 08, 2008 04:12PM

The following query produces no results:

SELECT * from items WHERE MATCH(items.name) AGAINST('-unwantedWord' IN BOOLEAN MODE);

I know the documentation predicts that will happen, but (as may be apparent) I'm wanting to select all rows that don't have the word 'unwantedWord' in the 'name' field - i.e., the FULLTEXT equivalent of something like SELECT * from items WHERE items.name not like '% unwantedWord %';

Surely, I'm not the only one that needs to do this - is it possible to achieve with FULLTEXT?!

Cheers,
James

Options: ReplyQuote


Subject
Views
Written By
Posted
Problem with FULLTEXT - how to exclude the only search word?
5233
October 08, 2008 04:12PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.