Help with FULLLTEXT syntax

Discussion in 'Databases' started by Greg-J, Apr 7, 2008.

  1. #1
    I believe the proper syntax for the query I'm after would be:
    SELECT * FROM `table` WHERE MATCH (title,description) AGAINST('_search_term_')

    However, I get an error of
    #1191 - Can't find FULLTEXT index matching the column list

    When I use this query though, all is well:
    SELECT * FROM `table` WHERE MATCH (title) AGAINST('templates') OR MATCH (description) AGAINST('templates')

    It's my understanding that the first one should work. Any help on the matter is appreciated.
     
    Greg-J, Apr 7, 2008 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    Because you have created separate FULLTEXT index on both columns. If you want to use both columns in a single MATCH() then you need to create a combined FULLTEXT index on these.
     
    mwasif, Apr 8, 2008 IP