MySql Full text search 한글

Article

MySql Full text search 한글

[MySql] Full text search 한글

0. mac local mysql shutdown
0.1. 명령어
sudo /usr/local/mysql/support-files/mysql.server stop
0.2. Result
0.3. References 
 
 
1. 한글 검색을 위한 my.cnf 수정
1.1. my.cnf 경로
leejinwon@/usr/local/mysql-5.6.17-osx10.7-x86_64
1.2. 추가할 정보
1.2.1. 속성 값 수정
ft_min_word_len = 2
1.2.2. references
 
 
 
2. alter table 테이블 명 fulltext (컬럼명)
2.1. Example
alter table tb_player_info add fulltext(introduce);
 

  
3. 테이블 갱신
3.1. query 

repair table TB_BOARD_ARTICLE quick;
3.2. References
 
 
4. 테이블 조회
4.1. Example
select * from tb_player_info where match(introduce) against('*Paul*');

select * from tb_player_info where match(introduce) against('*Paul*' in boolean mode);
 

  
5. ***** CAUTION ******
5.1. 만약 alter 문을 이용하여 fulltext index를 주지 않고 select 하는 경우
5.1.1. Occurred error following this :
17:04:58     select * from TB_BOARD_ARTICLE where match(title, content) against('*테스트*' in boolean mode) LIMIT 0, 1000     Error Code: 1191. Can't find FULLTEXT index matching the column list     0.000 sec



  



Dev Jinwon's Share
f
t