MATCH AGAINST with multiple columns in MySQL
I am trying to create a simplified search box that will match multiple columns against a keyword or keywords the user inputs. The following code is my attempt at using MySQL's `MATCH`/`AGAINST`. However, I cannot get the query to execute properly when there are two columns specified, in this case 'topic, country'. It will execute when I run the code as either 'country' or 'topic', but not both.

Is there a secret to this?


    SELECT * ,
    MATCH (
    topic, country
    )
    AGAINST (
    'China'
    ) AS score
    FROM reports2
    WHERE MATCH (
    topic, country
    )
    AGAINST (
    'China'
    )
    ORDER BY score DESC

yields:

    #1191 - Can't find FULLTEXT index matching the column list

Which I find to be an inaccurate description of the error, because there are FULLTEXT indices for both of these. I even copied the table, turned it into MyISAM from INNODB, in order to do so.

Any suggestions would be appreciated.
MATCH AGAINST with multiple columns in MySQL
===

I am trying to create a simplified search box that will match multiple columns against a keyword or keywords the user inputs. The following code is my attempt at using MySQL's `MATCH`/`AGAINST`. However, I cannot get the query to execute properly when there are two columns specified, in this case 'topic, country'. It will execute when I run the code as either 'country' or 'topic', but not both.

Is there a secret to this?


    SELECT * ,
    MATCH (
    topic, country
    )
    AGAINST (
    'China'
    ) AS score
    FROM reports2
    WHERE MATCH (
    topic, country
    )
    AGAINST (
    'China'
    )
    ORDER BY score DESC

yields:

    #1191 - Can't find FULLTEXT index matching the column list

Which I find to be an inaccurate description of the error, because there are FULLTEXT indices for both of these. I even copied the table, turned it into MyISAM from INNODB, in order to do so.

Any suggestions would be appreciated.