?
Solved

Can't find FULLTEXT index matching the column list

Posted on 2004-11-17
2
Medium Priority
?
4,451 Views
Last Modified: 2008-03-17
I'm getting the error:

"Can't find FULLTEXT index matching the column list"

I have found that the column list in my query must EXACTLY match the column list in my FULL TEXT index.

So if I want to query like this:

SELECT FileID,'File'
FROM FileMetaData
WHERE MATCH (FileText,OrigAuthor,LastModAuthor,Description,Custom5Value)
AGAINST ('one for the money')

. . .I must create my fulltext index like this:

CREATE TABLE FileMetadata (
  FileMetadataID int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
  FileID int(11) NULL,
  FolderID int(11) NULL,
  ProjectID int(11) NULL,
  FileText text NULL,
  FileTextPage int(11) NULL,
  OrigAuthor varchar(50) NULL, #mandatory metadata field
  LastModAuthor varchar(50) NULL, #mandatory metadata field
  Description varchar(100) NULL, #mandatory metadata field
  Custom1Value varchar(50) NULL,
  Custom2Value varchar(50) NULL,
  Custom3Value varchar(50) NULL,
  Custom4Value varchar(50) NULL,
  Custom5Value varchar(50) NULL,
  FULLTEXT KEY idxFileMetaData (FileText,OrigAuthor,LastModAuthor,Description,Custom5Value)
);

. . .but this is not practical for me, because any combination of those fields can be searchable by a user. My UI allows users to select which fields to search against. If their selection happens to not correspond with the exact fields as specified in the fulltext key, I get the error mentioned above. Even if I include EVERY text-like column in the table, in the fulltext index, if the user wants to search only against a subset of those columns, the error will result.

It's hard for me to believe that MySQL 4.1 could possibly be this inflexible. . .? I must be doing something wrong. How can I include all text-like columns in my fulltext index, but still allow users to search against any desired subset of those columns?

Or is there some trick for an alternative? I guess if i had to query against all columns every time, is there a way for me to exclude records that matched against columns that the user did not want to include in the search?
0
Comment
Question by:SweatCoder
2 Comments
 
LVL 20

Accepted Solution

by:
virmaior earned 2000 total points
ID: 12627760
I think you can use a fulltext  for each field and just union them.
I don't think you have any other alternative.  
There's no such thing as partial indexing (e.g. using less than all of the fields that compose an index)
0
 
LVL 11

Author Comment

by:SweatCoder
ID: 12627827
yes, i came to that conclusion as well. i had to make a separate index for each field, and then in my queries, specify a single field for each query and do a bunch of unions.

this is a real flaw in mysql. it's very rigid and allows no flexibility in the way the sql is written, and thus how the app is developed in this sense.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question