SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member Greg-J's Avatar
    Join Date
    Feb 2006
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with FULLLTEXT syntax

    I believe the proper syntax for the query I'm after would be:
    Code:
    SELECT * FROM `table` WHERE MATCH (title,description) AGAINST('_search_term_')
    However, using that query I get an error of
    #1191 - Can't find FULLTEXT index matching the column list

    When I use this query though, all is well:
    Code:
    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.

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    to use fulltext indexing, you MUST have an index that EXACTLY matches what you have in your match() request.
    Code:
    alter table `table` add fulltext index (title, description)
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast

  3. #3
    SitePoint Member Greg-J's Avatar
    Join Date
    Feb 2006
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had added the index to each individual column, but didn't realize I needed to do so for both together.

    Thank you very much.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •