2

Iam trying to execute this query in my xampp, but it is not turning up.

SELECT pid,description,alttext FROM wp_ngg_pictures WHERE MATCH 
(description, filename, alttext) AGAINST ('*image2*' IN BOOLEAN MODE) AND exclude != 1

it has returned this error

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

can any one help me plz

Nagaraj S
  • 13,316
  • 6
  • 32
  • 53
user3219680
  • 49
  • 1
  • 1
  • 4
  • 1
    do you have a fulltext index on the `(description,filename,alltext)` tuple? Given the error message, I'm guessing not - you can't just start throwing around fulltext searches without first having created fulltext indexes on the field(s) you'll be doing those fulltext searches on. – Marc B Feb 11 '14 at 04:59
  • Iam sorry, iam new to this php. i don't know about fulltext. could You plz guide me – user3219680 Feb 11 '14 at 05:02
  • https://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html – Marc B Feb 11 '14 at 05:02
  • Thank you for your help. It is executing now. i got good info from the link – user3219680 Feb 11 '14 at 05:27

1 Answers1

6
ALTER TABLE table ADD FULLTEXT index_name(column1);

Try the above query to add full text index to the columns.

Nagaraj S
  • 13,316
  • 6
  • 32
  • 53
Manju
  • 747
  • 4
  • 10
  • 21
  • The key is to have the index matching the columns - it should have exactly as much columns as you are matching. – PeerBr Mar 30 '15 at 22:24