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() ¸¦ »ç¿ëÇÑ´Ù.

  1. ÃÖ¼ÒÇÑ ÇÊ¿äÇÑ ¹®ÀÚÀÇ ±æÀÌ´Â 4ÀÚ ÀÌ»ó
  2. 3ÀÚ ÀÌÇÏ´Â °Ë»öÀÌ µÇÁö ¾Ê´Â´Ù.
  3. º¸Åë noise word ( "the, for, as,  in, to ... " ) µîÀº °Ë»öÀÌ µÇÁö ¾Ê´Â´Ù.
  4. GRIP ¿¡¼­´Â Full Text Search ½Ã "gene, protein .. " °°Àº ´Ü¾î¶ÇÇÑ noise word ¶ó°í »ý°¢µÊ
  5. noise word ´Â Ãß°¡°¡ °¡´ÉÇÏ°í ¼Ò½º ÆÄÀÏ myisam/ft_static.c ¿¡ ³»¿ëÀÌ µé¾îÀÖ´Ù. ÀÌ ÆÄÀÏ¿¡ ³»¿ëÀ» Ãß°¡ÇÏ°í Àç ÄÄÆÄÀÏ °¡´É

¡¡

½ÇÁ¦ »ç¿ë ¿¹

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)