I'm adding a "search by email" functionality on my contacts database table (MySQL, InnoDB engine) for our CRM system. I added the FULLTEXT index and partial searches like this
WHERE MATCH(cc.email_c) AGAINST('Joe' IN NATURAL LANGUAGE MODE)
are working fine. However, if I try to match against a full email address like this
WHERE MATCH(cc.email_c) AGAINST('[email protected]' IN NATURAL LANGUAGE MODE)
all email addresses with Gmail get returned. I've already discarded the possibility of using BOOLEAN MODE, from what I understand it doesn't support the "@" symbol in a query. Is there any other way of using a MATCH AGAINST while still being able to search by the exact full address?
I can always use an SQL with LIKE and some wildcards, but I would still prefer to have a full-text search.
LIKE
, usingOR
. If you want to know why read the documentation how fulltext search works in general. – OtwayOR
. – Durante