I have a bog standard MySQL fulltext query as follows:
SELECT * FROM accounts WHERE MATCH(first_name, username) AGAINST ('stringhere')
The problem is, it can’t find the fulltext index on the field first_name, even though I’ve indexed it a few times now. It works fine when I do this:
SELECT * FROM accounts WHERE MATCH(username) AGAINST ('stringhere')
Or this:
SELECT * FROM accounts WHERE MATCH(first_name) AGAINST ('stringhere')
But not with two or more fields. What am I doing wrong here? I’ve made sure the indexes are set on the fields, and I’ve even REPAIRed the table, but still no worky 🙁
I get this result when using more than one field:
Error in query: Can't find FULLTEXT index matching the column list
Which is confusing and irritating because, like I said, I have definitely defined the fulltext index.
Thanks for any help,
James
It would be useful to see the output of
I suppose that you have something like
instead of