MySQL ¿¡¼ Á¦°øÇÏ´Â Full Text Search
MySQL ¿¡¼À妽º´Â BLOB ³ª TEXT µ¥ÀÌÅÍÇü¿¡´Â »ç¿ëÇÒ ¼ö ¾ø¾úÀ¸³ª Full Text Search ´Â
TEXT, VARCHAR ,CHAR Ä÷³¿¡ À妽º¸¦ »ç¿ë °¡´ÉÇÏ°Ô ÇØÁØ´Ù.
¡¡
Syntax
ALTER TABLE table_name ADD FULLTEXT [index_name] (index_col_name, .... ) or
CREATE FULLTEXT INDEX index_name ON table_name (col_name[(length)], ... )
¡¡
½ÇÁ¦·Î Query ¸¦ ÀÌ¿ëÇÒ ¶§´Â MATCH()~AGAINST() ¸¦ »ç¿ëÇÑ´Ù.
¡¡
½ÇÁ¦ »ç¿ë ¿¹
mysql> select locusid, summary from LocusLink where
match(summary) against('"adenocarcinoma cells"' in boolean mode);
¡¡
*************************** 1. row
***************************
locusid: 14
summary: The gene product is an immunoglobulin-type protein. It is found to be
expressed strongly in endothelial cells, cytotrophoblasts, and poorly
differentiated colon adenocarcinoma cells found in lymphatics. The protein
contains a heparin-binding domain and mediates heparin-sensitive cell adhesion.
¡¡
*************************** 2. row
***************************
locusid: 25859
summary: This gene is induced by androgen in prostate adenocarcinoma cells.
Transcript variants utilizing alternative polyadenylation signals have been
described in the literature.
2 rows in set (0.00 sec)