koyachi tsutomu
rtk21****@hotma*****
2005年 9月 15日 (木) 20:03:09 JST
>1) $B%F!<%V%k$N%9%-!<%^(B >2) $BEPO?$5$l$F$$$k%l%3!<%I$NFbMF(B($B:9$7;Y$($J$1$l$P(B) >3) $B4|BT$9$k7k2L$,JV$i$J$$%/%(%j!<(B(SQL$BJ8(B) > >$B$r<($7$FD:$1$k$H860xFCDj$K6a$E$1$k$+$bCN$l$^$;$s!#(B $B-!:G=i$K;n$7$F(BNG$B$@$C$?$H$-$N>e5->pJs(B $B-"%G!<%?%Y!<%9$r:o=|$7!"%G!<%?%Y!<%9:n @ .$+$iF1MM$N<j=g$G:#F|;n$7$?%m%0(B $B-#(BLD_LIBRARY_PATH$B$, @ _Dj$5$l$F$$$J$+$C$?$?$a$+!)$H;W$$!"@_Dj$7$F:#F|;n$7$?%m(B $B%0(B $B$r0J2<$K<($7$^$9!#(B $B:#F|;n$7$?$b$N$O-"!"-#$N=g$K<B9T$7$^$7$?!#(B $B$$$:$l$b4|BT$7$?7k2L$OJV$C$F$-$^$;$s$G$7$?!#(B $B0J2<!"%m%0ItJ,$,D9$$$G$9$,$h$m$7$/$*4j$$$7$^$9!#(B ("#"$BItJ,$O%3%a%s%H$G$9!#(B) ################################################################################ # # $B-!(B # 1)$B%F!<%V%k%9%-!<%^(B($B<jBG$A(B) # create database sennatest; use sennatest create table articles( id int unsigned not null auto_increment primary key, body text, fulltext(body) ); # # 2)$BF~NO%G!<%?(B # $ cat sennatest use sennatest; insert into articles values (null,"$BM9CyL11D2=$O=EMW$JLdBj$@$H;W$&(B "), (null,"$B%9%m!<%i%$%U$r;V8~$9$k(BiPod$B$N6/$_(B - CNET Japan"), (null,"HTML, CSS, Photoshop$B$rF1;~$K3X$Y$k%5%s%W%kIU$-%G%6%$%s5-;v!'(B Goodpic"), (null,"jazzanova$B$NF|5-(B - $B8=:_8\LdJ[8n;N$KAjCLCf$G$"$j!"BP1~$K$D$$$F$b8!F$Cf(B "), (null,"mixi$BHs8x<0%K%e!<%9%5%$%H(B - mixi$B$NLdBj?MJ*(BKusakabe$B;a!"6/@)B`2q$K!)(B"), (null,"$B$`$@$E$+$$$K$C$-!i!'%M%C%H>e$G5DO@$r;E3]$1$k;v$K$D$$$F(B"), (null,"$B$O$F$J(B perl $B%O%C%+!<$NJ}!9$K$*J9$-$7$^$9!#6a:"$^$9$^$9NI$$46$8$J(Bperl $B$G$9$,!"$I$N$h$&$J3+H/4D6-$G3+H/$7$F$$$^$9$G$7$g$&$+!#(B"), (null,"$B%7%J%H%i @ iBe;R(B - $BEj$2A,$,Ht$S8r$&$J$+$G%@%$%"%j!<$KN)$F$3$b$k!"$H$$$&(B $B0UL#!#(B"), (null,"Going My Way: Skype$B$N2qOC$r(BPodcast$BMQ$KO?2;$9$k>l9g$N @ _DjJ}K!(B"), (null,"Kusakabe$B$5$s$,(Bmixi$B$N0lIt!)$rFx$o$7$F$$$k!#H`$K(Bmixi$B6/@)B`2q$,8@$$EO$5(B $B$l$?$N$@!#(B"), (null,"Ringo's Weblog: google$B$H6%9g$7$J$$J}K!(B2 "), (null,"Moleskin Diary - $BEj$2A,$h$j$?$lA,(B"), (null,"$BBh(B38$B2s!!3$30%a%G%#%"$,EA$($?>. @ t!&M9@/2r;67`$NI>H=(B - nikkeibp.jp - $BN)(B $B2VN4$N!V%a%G%#%"(B $B%=%7%*(B-$B%]%j%F%#%/%9!W(B"), (null,"$B$[$=$NF|5-(B - $B%U%)!<%`$,JQ99$5$l$?;v$rCN$k(B"), (null,"$BAmA*5s$O$F$J$H8x?&A*5sK!(B:$BKL3$F;$K=;$`9q2H8xL30wF|5-(B "), (null,"$B$O$F$J!"@/E^$r3t<0$K8+N)$F$FAmA*5s7k2L$rM=B,(B - CNET Japan"); # # 3-1)$B8!:w%/%(%j(B($B1Q8l(B) # $ cat sennatest_en use sennatest; select * from articles where match (body) against ('perl'); select * from articles where match (body) against ('Japan'); # # 3-2)$B8!:w%/%(%j(B($BF|K\8l(B) # $ cat sennatest_jp use sennatest; select * from articles where match (body) against ('$B$O$F$J(B'); # # senna-patched mysql$B%5!<%P!<5/F0(B # $ sudo /etc/init.d/mysql-senna.server start Password: # # senna-patched mysql$B%/%i%$%"%s%H5/F0(B # $ /usr/local/mysql-4.0.24-senna/bin/mysql --host=localhost --socket=/usr/local/mysql-4.0.24-senna/tmp/mysql.sock -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 4.0.24-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> use sennatest; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> describe articles; +-------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+------------------+------+-----+---------+----------------+ | id | int(10) unsigned | | PRI | NULL | auto_increment | | body | text | YES | MUL | NULL | | +-------+------------------+------+-----+---------+----------------+ 2 rows in set (0.00 sec) mysql> select * from articles; +----+----------------------------------------------------------------------------------------------------------------------------+ | id | body | +----+----------------------------------------------------------------------------------------------------------------------------+ | 1 | $BM9CyL11D2=$O=EMW$JLdBj$@$H;W$&(B | | 2 | $B%9%m!<%i%$%U$r;V8~$9$k(BiPod$B$N6/$_(B - CNET Japan | | 3 | HTML, CSS, Photoshop$B$rF1;~$K3X$Y$k%5%s%W%kIU$-%G%6%$%s5-;v!'(BGoodpic | | 4 | jazzanova$B$NF|5-(B - $B8=:_8\LdJ[8n;N$KAjCLCf$G$"$j!"BP1~$K$D$$$F$b8!F$Cf(B | | 5 | mixi$BHs8x<0%K%e!<%9%5%$%H(B - mixi$B$NLdBj?MJ*(BKusakabe$B;a!"6/@)B`2q$K!)(B | | 6 | $B$`$@$E$+$$$K$C$-!i!'%M%C%H>e$G5DO@$r;E3]$1$k;v$K$D$$$F(B | | 7 | $B$O$F$J(B perl $B%O%C%+!<$NJ}!9$K$*J9$-$7$^$9!#6a:"$^$9$^$9NI$$46$8$J(Bperl $B$G$9$,!"$I$N$h$&$J3+H/4D6-$G3+H/$7$F$$$^$9$G$7$g$&$+!#(B | | 8 | $B%7%J%H%i @ iBe;R(B - $BEj$2A,$,Ht$S8r$&$J$+$G%@%$%"%j!<$KN)$F$3$b$k!"$H$$$&(B $B0UL#!#(B | | 9 | Going My Way: Skype$B$N2qOC$r(BPodcast$BMQ$KO?2;$9$k>l9g$N @ _DjJ}K!(B | | 10 | Kusakabe$B$5$s$,(Bmixi$B$N0lIt!)$rFx$o$7$F$$$k!#H`$K(Bmixi$B6/@)B`2q$,8@$$EO$5(B $B$l$?$N$@!#(B | | 11 | Ringo's Weblog: google$B$H6%9g$7$J$$J}K!(B2 | | 12 | Moleskin Diary - $BEj$2A,$h$j$?$lA,(B | | 13 | $BBh(B38$B2s!!3$30%a%G%#%"$,EA$($?>. @ t!&M9@/2r;67`$NI>H=(B - nikkeibp.jp - $BN)(B $B2VN4$N!V%a%G%#%"(B $B%=%7%*(B-$B%]%j%F%#%/%9!W(B | | 14 | $B$[$=$NF|5-(B - $B%U%)!<%`$,JQ99$5$l$?;v$rCN$k(B | | 15 | $BAmA*5s$O$F$J$H8x?&A*5sK!(B:$BKL3$F;$K=;$`9q2H8xL30wF|5-(B | | 16 | $B$O$F$J!"@/E^$r3t<0$K8+N)$F$FAmA*5s7k2L$rM=B,(B - CNET Japan | +----+----------------------------------------------------------------------------------------------------------------------------+ 16 rows in set (0.01 sec) mysql> ################################################################################ # # $B-"(B # $B%G!<%?%Y!<%9!"%F!<%V%k$r:n$jD>$7$F:F3NG'$7$F$_$k(B # $ sudo /etc/init.d/mysql-senna.server start Password: $ /usr/local/mysql-4.0.24-senna/bin/mysql --host=localhost --socket=/usr/local/mysql-4.0.24-senna/tmp/mysql.sock -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 4.0.24-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> show databases; +-----------+ | Database | +-----------+ | mysql | | sennatest | | test | +-----------+ 3 rows in set (0.00 sec) mysql> drop database sennatest; Query OK, 0 rows affected (0.01 sec) mysql> show databases; +----------+ | Database | +----------+ | mysql | | test | +----------+ 2 rows in set (0.00 sec) mysql> create database sennatest; Query OK, 1 row affected (0.00 sec) mysql> use sennatest; Database changed mysql> create table articles( -> id int unsigned not null auto_increment primary key, -> body text, -> fulltext(body) -> ); Query OK, 0 rows affected (0.01 sec) mysql> quit; $ /usr/local/mysql-4.0.24-senna/bin/mysql --host=localhost --socket=/usr/local/mysql-4.0.24-senna/tmp/mysql.sock -u root < sennatest $ /usr/local/mysql-4.0.24-senna/bin/mysql --host=localhost --socket=/usr/local/mysql-4.0.24-senna/tmp/mysql.sock -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 to server version: 4.0.24-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> use sennatest; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> select * from articles; +----+----------------------------------------------------------------------------------------------------------------------------+ | id | body | +----+----------------------------------------------------------------------------------------------------------------------------+ | 1 | $BM9CyL11D2=$O=EMW$JLdBj$@$H;W$&(B | | 2 | $B%9%m!<%i%$%U$r;V8~$9$k(BiPod$B$N6/$_(B - CNET Japan | | 3 | HTML, CSS, Photoshop$B$rF1;~$K3X$Y$k%5%s%W%kIU$-%G%6%$%s5-;v!'(BGoodpic | | 4 | jazzanova$B$NF|5-(B - $B8=:_8\LdJ[8n;N$KAjCLCf$G$"$j!"BP1~$K$D$$$F$b8!F$Cf(B | | 5 | mixi$BHs8x<0%K%e!<%9%5%$%H(B - mixi$B$NLdBj?MJ*(BKusakabe$B;a!"6/@)B`2q$K!)(B | | 6 | $B$`$@$E$+$$$K$C$-!i!'%M%C%H>e$G5DO@$r;E3]$1$k;v$K$D$$$F(B | | 7 | $B$O$F$J(B perl $B%O%C%+!<$NJ}!9$K$*J9$-$7$^$9!#6a:"$^$9$^$9NI$$46$8$J(Bperl $B$G$9$,!"$I$N$h$&$J3+H/4D6-$G3+H/$7$F$$$^$9$G$7$g$&$+!#(B | | 8 | $B%7%J%H%i @ iBe;R(B - $BEj$2A,$,Ht$S8r$&$J$+$G%@%$%"%j!<$KN)$F$3$b$k!"$H$$$&(B $B0UL#!#(B | | 9 | Going My Way: Skype$B$N2qOC$r(BPodcast$BMQ$KO?2;$9$k>l9g$N @ _DjJ}K!(B | | 10 | Kusakabe$B$5$s$,(Bmixi$B$N0lIt!)$rFx$o$7$F$$$k!#H`$K(Bmixi$B6/@)B`2q$,8@$$EO$5(B $B$l$?$N$@!#(B | | 11 | Ringo's Weblog: google$B$H6%9g$7$J$$J}K!(B2 | | 12 | Moleskin Diary - $BEj$2A,$h$j$?$lA,(B | | 13 | $BBh(B38$B2s!!3$30%a%G%#%"$,EA$($?>. @ t!&M9@/2r;67`$NI>H=(B - nikkeibp.jp - $BN)(B $B2VN4$N!V%a%G%#%"(B $B%=%7%*(B-$B%]%j%F%#%/%9!W(B | | 14 | $B$[$=$NF|5-(B - $B%U%)!<%`$,JQ99$5$l$?;v$rCN$k(B | | 15 | $BAmA*5s$O$F$J$H8x?&A*5sK!(B:$BKL3$F;$K=;$`9q2H8xL30wF|5-(B | | 16 | $B$O$F$J!"@/E^$r3t<0$K8+N)$F$FAmA*5s7k2L$rM=B,(B - CNET Japan | +----+----------------------------------------------------------------------------------------------------------------------------+ 16 rows in set (0.00 sec) mysql> quit; $ /usr/local/mysql-4.0.24-senna/bin/mysql --host=localhost --socket=/usr/local/mysql-4.0.24-senna/tmp/mysql.sock -u root < sennatest_en id body 1 $BM9CyL11D2=$O=EMW$JLdBj$@$H;W$&(B id body 1 $BM9CyL11D2=$O=EMW$JLdBj$@$H;W$&(B 1 $BM9CyL11D2=$O=EMW$JLdBj$@$H;W$&(B $ /usr/local/mysql-4.0.24-senna/bin/mysql --host=localhost --socket=/usr/local/mysql-4.0.24-senna/tmp/mysql.sock -u root < sennatest_jp id body 1 $BM9CyL11D2=$O=EMW$JLdBj$@$H;W$&(B 1 $BM9CyL11D2=$O=EMW$JLdBj$@$H;W$&(B 1 $BM9CyL11D2=$O=EMW$JLdBj$@$H;W$&(B koyachi @ sp1200:~/tmp$ ################################################################################ # # $B-#(B # LD_LIBRARY_PATH$B @ _Dj$7$F:F3NG'(B # $ su Password: $ printenv SHELL=/bin/bash TERM=vt100 JLESSCHARSET=japanese-euc SSH_CLIENT=::ffff:219.97.22.57 1127 22 SSH_TTY=/dev/pts/0 USER=root LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35: PAGER=lv PATH=/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin MAIL=/var/mail/koyachi PWD=/home/koyachi/tmp LANG=ja_JP.eucJP TZ=JST-9 PS1=\h:\w\$ HOME=/root SHLVL=2 LANGUAGE=ja_JP:ja:en_GB:en LV=-Oej LOGNAME=koyachi SSH_CONNECTION=::ffff:219.97.22.57 1127 ::ffff:192.168.0.101 22 _=/usr/bin/printenv $ export LD_LIBRARY_PATH="/usr/local/mecab-0.81-senna/lib:/usr/local/senna/lib:/usr/local/mysql-4.0.24-senna/lib:/lib:/usr/lib:/usr/local/lib" $ printenv SHELL=/bin/bash TERM=vt100 JLESSCHARSET=japanese-euc SSH_CLIENT=::ffff:219.97.22.57 1127 22 SSH_TTY=/dev/pts/0 USER=root LD_LIBRARY_PATH=/usr/local/mecab-0.81-senna/lib:/usr/local/senna/lib:/usr/local/mysql-4.0.24-senna/lib:/lib:/usr/lib:/usr/local/lib LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35: PAGER=lv PATH=/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin MAIL=/var/mail/koyachi PWD=/home/koyachi/tmp LANG=ja_JP.eucJP TZ=JST-9 PS1=\h:\w\$ HOME=/root SHLVL=2 LANGUAGE=ja_JP:ja:en_GB:en LV=-Oej LOGNAME=koyachi SSH_CONNECTION=::ffff:219.97.22.57 1127 ::ffff:192.168.0.101 22 _=/usr/bin/printenv $ /usr/local/mysql-4.0.24-senna/bin/mysql --host=localhost --socket=/usr/local/mysql-4.0.24-senna/tmp/mysql.sock -u root < sennatest_en id body 1 $BM9CyL11D2=$O=EMW$JLdBj$@$H;W$&(B id body 1 $BM9CyL11D2=$O=EMW$JLdBj$@$H;W$&(B 1 $BM9CyL11D2=$O=EMW$JLdBj$@$H;W$&(B $ /usr/local/mysql-4.0.24-senna/bin/mysql --host=localhost --socket=/usr/local/mysql-4.0.24-senna/tmp/mysql.sock -u root < sennatest_jp id body 1 $BM9CyL11D2=$O=EMW$JLdBj$@$H;W$&(B 1 $BM9CyL11D2=$O=EMW$JLdBj$@$H;W$&(B 1 $BM9CyL11D2=$O=EMW$JLdBj$@$H;W$&(B ---- koyachi