Creating a Full Text Index on my tables

Zucarita9000

Golden Member
Aug 24, 2001
1,590
0
0
I'm trying to improve a search engine I wrote by using the Full Text Search feature of MySQL. I want to do a full text search on a single table:

SELECT * FROM Products
WHERE MATCH (ProductName) AGAINST &srchString

Where "srchString" is the variable that holds the value of the request.form from the search form.

I get the following error, as I haven't created the index yet:

Can't find FULLTEXT index matching the column list

I have to create a Full Text Index on the "Products" table for the "ProductName" and "ProductEnglishName" columns. So far, I've tried two methods with no luck:

1. CREATE FULLTEXT INDEX ON Products (ProductName, ProductEnglishName)
2. ALTER TABLE Products ADD FULLTEXT (ProductName, ProductEnglishName)

What am I doing wrong?

 

webie

Member
Mar 23, 2004
36
0
0
Are you using any GUI?

If not maybe you can try the following SQL Query:

ALTER TABLE `DATABASE_NAME`.`Products`
ADD FULLTEXT INDEX `ProductName` (`ProductName`);