We have Table which has many fields with FULLTEXT Index on them.
We want to add a new Field to this Table which is also FULLTEXT and thus searchable via same search.
So we added this new column via:
ALTER TABLE swd ADD COLUMN phone VARCHAR(20);
and then added his:
ALTER TABLE swd ADD FULLTEXT (phone);
But when searching with this new filed included in the search, that is via:
SELECT id, ix_id, title, descpt, category FROM swd
WHERE MATCH (title, descpt, phone) AGAINST(‘$find’)
we get Error message:
Can’t find FULLTEXT index matching the column list
What to do to correct this?
Note that fields title, descpt had FULLTEXT added to them when the Table was created and the show create table lists like:
MySQL cannot use multiple indexes from one table in the same query. It always uses the best it finds. All fulltext columns must be in an compound index, i.e. you need a fulltext index on (title, descpt, phone).
But col1, col2, aka: title, descpt
already have fulltext index on them.
So how to bring the new cold: phone
into the same FULLTEXT search as cols: title, descpt
which already have fulltext index on them?
Keeping in mind again that cols: title, descpt
are part of a live search system with massive amount of data in them.
Hi,
Sorry, the answer is what I posted in the message before that.
So 1st we need to DROP the current FULLTEXT Indexes and then put all the Cols that are to be FULLTEXT Indexed under the new FULLTEXT Index.
And NO, no data are lost.