When I search for:
SELECT * FROM db.test
WHERE
MATCH(story)AGAINST('(+bananas -banana*)'IN BOOLEAN MODE)
I get rows returned but when I search for
SELECT * FROM db.test
WHERE
MATCH(story)AGAINST('(+bananas -bananas)'IN BOOLEAN MODE)
or
SELECT * FROM db.test
WHERE
MATCH(story)AGAINST('(+bananas -bananas*)'IN BOOLEAN MODE)
I get no result. To me it seems like you can´t use * together with the minus sign.
Does anybody know if thats the case or if its a setting in MySql.
Kind regards
Olle
The table is MYISAM and I have a index on the column story.
The solution is to skip the parentheses. If I search for ‘+bananas -banana*’ instead of ‘(+bananas -banana*)’ it works. It took a while to figure out thou.
Cheers