If you don't succeed at first, RTFM
Yeah, I know it doesn't work because I tried it, and then afterwards the manual told me it wouldn't work. It would be nice to be able to search a subset of columns in the full text index but it cannot be done quite so simply as naming those column in the MATCH() function. According to the MySQL documentation:
"For natural-language full-text searches, it is a requirement that the columns named in the MATCH() function be the same columns included in some FULLTEXT index in your table. For the preceding query, note that the columns named in the MATCH() function (title and body) are the same as those named in the definition of the article table's FULLTEXT index. If you wanted to search the title or body separately, you would need to create FULLTEXT indexes for each column. "
"For natural-language full-text searches, it is a requirement that the columns named in the MATCH() function be the same columns included in some FULLTEXT index in your table. For the preceding query, note that the columns named in the MATCH() function (title and body) are the same as those named in the definition of the article table's FULLTEXT index. If you wanted to search the title or body separately, you would need to create FULLTEXT indexes for each column. "
0 Comments:
Post a Comment
<< Home