开发者

MySQL FULLTEXT search

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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜