I am writing a newsletter script and I need to implement searching in the addresses. I indexed the table with FULLTEXT but when I do a query such as:
SELECT
You can use a traditional index (with a simple = operator) instead of a fulltext index. It will work fast and use less resource on DB engine.
SELECT * FROM addresses WHERE email = 'name@example.com';
In this case, it is also possible to use a like operator, with % at the end of search string if you want to find by initial part of email address.
SELECT * FROM addresses WHERE email like 'name@exam%';
To match an exact phrase you have to enclose the phrase in double quotes. So change your query to:
SELECT * FROM addresses WHERE MATCH(email) AGAINST('"name@example.com"' IN BOOLEAN MODE)
Source