MySQL fulltext index search with multiple columns
MySQL Table - sample_table: col1 col2 col3 col4
Fulltext index: Keyname: some_keyname Columns: col1, col2, col3, col4
Question:
To search for a string "abcd" in any column, do we have to match all column names? Like this:
SELECT col2, col3 from sample_table
where MATCH(col1, col2, col3, col4) AGAINST ("abcd")
Or it is possible to use the keyname (or something similar)? Such as:
SELECT col2, col3 from sample_table
where MATCH(some_keyname) AGAINST ("abcd")
Thanks in advance for all responses!
(The following works, of course..)
SELECT col2, col3 from sample_table
where MATCH(col1, col2, col3, col4) AGAINST ("abcd")