Art
Art

Reputation: 11

MySQL FULLTEXT search

How do you add a column to a fulltext search in MySQL to indicate which words were included in the search?

Upvotes: 1

Views: 466

Answers (3)

Elemental
Elemental

Reputation: 7466

Michal got the query syntax down, to create a full text index to assist this search use

Create FULLTEXT Index Test ON Table1(ColumnName1)

Much more at MySQL Docs

Upvotes: 2

Sreejith Sasidharan
Sreejith Sasidharan

Reputation: 1368

Use the following command

ALTER TABLE "table_name"
ADD INDEX " INDEX_NAME " (COLUMN_NAME)

Upvotes: -3

Michal Dymel
Michal Dymel

Reputation: 4360

You mean query or index definition? For query it would be something like this:

WHERE 
  MATCH (colA, colB) AGAINST ('+words* +you* +search*' IN BOOLEAN MODE)

Upvotes: 2

Related Questions