开发者

MySQL FULLTEXT search

开发者 https://www.devze.com 2022-12-17 05:26 出处:网络
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?

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

精彩评论

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