4

Possible Duplicate:
MySQL/PHP Search Efficiency

How to Add FullText Capability to the existing table in MySQL.

I've seen adding it directly at the time of table creation as follow.

CREATE TABLE articles (
    id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
    title VARCHAR(200),
    body TEXT,
    FULLTEXT (title,body)
);

But how to add FullText Manually after the table is created?

0

1 Answer 1

5

According to the docs at http://dev.mysql.com/doc/refman/5.0/en/alter-table.html

ALTER TABLE TABLE_NAME ADD [FULLTEXT|SPATIAL] [INDEX|KEY] [index_name]

Sign up to request clarification or add additional context in comments.

5 Comments

Note you'll need to add the attributes you want full text on in first!
is it correct? ALTER TABLE articles ADD [FULLTEXT] [INDEX] [Title]
Thanks for your effort @SiGanteng I got better answer from here.stackoverflow.com/a/2954062/1518640
@hungrycoder no problem, also, make sure that your table is using MyISAM as its engine.
yes it is using MyISAM only. But only problem is I need to check whether the FullText Catalog is supported by my hosting provider or not.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.