How do you add a column to a fulltext search in MySQL to indicate which words were included in t开发者_JS百科he search?
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)
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
Use the following command
ALTER TABLE "table_name"
ADD INDEX " INDEX_NAME " (COLUMN_NAME)
精彩评论