{"id":199,"date":"2008-02-11T12:13:53","date_gmt":"2008-02-11T03:13:53","guid":{"rendered":"https:\/\/deskplate.net\/blog\/2008\/02\/11\/senna-mysql-%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab\/"},"modified":"2008-02-11T12:13:53","modified_gmt":"2008-02-11T03:13:53","slug":"senna-mysql-%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/deskplate.net\/blog\/archives\/199","title":{"rendered":"Senna + MySQL \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p>senna\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u3001\u30d1\u30c3\u30c1\u3092\u5f53\u3066\u3066MySQL\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u5f8c\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\nsenna\/bindings\/mysql\u4ee5\u4e0b\u306bMySQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3059<br \/>\n\u30c0\u30a4\u30f3\u30ed\u30fc\u30c9\u3000<br \/>\nSenna : http:\/\/sourceforge.jp\/projects\/senna\/files\/<br \/>\nMySQL : http:\/\/downloads.mysql.com\/archives.php<br \/>\ntar xvzf senna-0.8.2.tar.gz<br \/>\ncd senna-0.8.2<br \/>\n.\/configure &#8211;prefix=\/usr<br \/>\nmake<br \/>\nmake install<br \/>\ncat \/var\/senna\/senna.conf<br \/>\ncd ..<br \/>\ntar xvzf mysql-5.0.24a.tar.gz<br \/>\ncd  mysql-5.0.24a<br \/>\npatch -p1 < ..\/senna-0.8.2\/bindings\/mysql\/mysql-5.0.24a.senna.diff\npatch -p1 < ..\/senna-0.8.2\/bindings\/mysql\/mysql-5.0.24a.senna.2ind.diff\nlibtoolize -c -f\naclocal-1.9\nautoheader\nautomake-1.9 -c -a -i\nautoconf\ntouch sql\/sql_yacc.yy\n.\/configure --with-charset=utf8 --with-extra-charsets=all --with-mysqld-user=mysql --with-named-c\nurses-libs=\/usr\/lib\/libncurses.so.5 --without-readline --with-senna --prefix=\/usr\/local\/mysql\nmake\nmake install\nls \/usr\/local\/\ncp \/usr\/local\/mysql\/share\/mysql\/my-medium.cnf \/etc\/my.cnf\nchown -R mysql \/usr\/local\/mysql\n\/usr\/local\/mysql\/bin\/mysql_install_db --user=mysql\n\/usr\/local\/mysql\/bin\/mysqld_safe &#038;\nps ax\n\/usr\/local\/mysql\/bin\/mysqlshow\ncp \/usr\/local\/mysql\/share\/mysql\/mysql.server \/etc\/init.d\/mysql\nchmod +x \/etc\/init.d\/mysql\n\/usr\/local\/mysql\/bin\/mysqladmin -u root password PASSWORD\n\/etc\/init.d\/mysql stop\n\/etc\/init.d\/mysql start\n\u52d5\u4f5c\u78ba\u8a8d\n# mysql -uroot -p\nmysql> create database sennatest;<br \/>\nmysql> create table articles(<br \/>\n-> id int unsigned not null auto_increment primary key,<br \/>\n-> body text,<br \/>\n-> fulltext(body)<br \/>\n-> );<br \/>\nmysql>  insert into articles values (null,&#8221;\u90f5\u8caf\u6c11\u55b6\u5316\u306f\u91cd\u8981\u306a\u554f\u984c\u3060\u3068\u601d\u3046 &#8220;), (null,&#8221;\u30b9\u30ed\u30fc\u30e9\u30a4\u30d5\u3092\u5fd7\u5411\u3059\u308biPod\u306e\u5f37\u307f &#8211; CNET Japan&#8221;), (null,&#8221;HTML, CSS, Photoshop\u3092\u540c\u6642\u306b\u5b66\u3079\u308b\u30b5\u30f3\u30d7\u30eb\u4ed8\u304d\u30c7\u30b6\u30a4\u30f3\u8a18\u4e8b\uff1aGoodpic&#8221;), (null,&#8221;jazzanova\u306e\u65e5\u8a18 &#8211; \u73fe\u5728\u9867\u554f\u5f01\u8b77\u58eb\u306b\u76f8\u8ac7\u4e2d\u3067\u3042\u308a\u3001\u5bfe\u5fdc\u306b\u3064\u3044\u3066\u3082\u691c\u8a0e\u4e2d&#8221;), (null,&#8221;mixi\u975e\u516c\u5f0f\u30cb\u30e5\u30fc\u30b9\u30b5\u30a4\u30c8 &#8211; mixi\u306e\u554f\u984c\u4eba\u7269Kusakabe\u6c0f\u3001\u5f37\u5236\u9000\u4f1a\u306b\uff1f&#8221;), (null,&#8221;\u3080\u3060\u3065\u304b\u3044\u306b\u3063\u304d&#x2642;\uff1a\u30cd\u30c3\u30c8\u4e0a\u3067\u8b70\u8ad6\u3092\u4ed5\u639b\u3051\u308b\u4e8b\u306b\u3064\u3044\u3066&#8221;), (null,&#8221;\u306f\u3066\u306a perl \u30cf\u30c3\u30ab\u30fc\u306e\u65b9\u3005\u306b\u304a\u805e\u304d\u3057\u307e\u3059\u3002\u8fd1\u9803\u307e\u3059\u307e\u3059\u826f\u3044\u611f\u3058\u306aperl\u3067\u3059\u304c\u3001\u3069\u306e\u3088\u3046\u306a\u958b\u767a\u74b0\u5883\u3067\u958b\u767a\u3057\u3066\u3044\u307e\u3059\u3067\u3057\u3087\u3046\u304b\u3002&#8221;), (null,&#8221;\u30b7\u30ca\u30c8\u30e9\u5343\u4ee3\u5b50 &#8211; \u6295\u3052\u92ad\u304c\u98db\u3073\u4ea4\u3046\u306a\u304b\u3067\u30c0\u30a4\u30a2\u30ea\u30fc\u306b\u7acb\u3066\u3053\u3082\u308b\u3001\u3068\u3044\u3046\u610f\u5473\u3002&#8221;), (null,&#8221;Going My Way: Skype\u306e\u4f1a\u8a71\u3092Podcast\u7528\u306b\u9332\u97f3\u3059\u308b\u5834\u5408\u306e\u8a2d\u5b9a\u65b9\u6cd5&#8221;), (null,&#8221;Kusakabe\u3055\u3093\u304cmixi\u306e\u4e00\u90e8\uff1f\u3092\u8cd1\u308f\u3057\u3066\u3044\u308b\u3002\u5f7c\u306bmixi\u5f37\u5236\u9000\u4f1a\u304c\u8a00\u3044\u6e21\u3055\u308c\u305f\u306e\u3060\u3002&#8221;), (null,&#8221;Ringo&#8217;s Weblog: google\u3068\u7af6\u5408\u3057\u306a\u3044\u65b9\u6cd52 &#8220;), (null,&#8221;Moleskin Diary &#8211; \u6295\u3052\u92ad\u3088\u308a\u305f\u308c\u92ad&#8221;), (null,&#8221;\u7b2c38\u56de\u3000\u6d77\u5916\u30e1\u30c7\u30a3\u30a2\u304c\u4f1d\u3048\u305f\u5c0f\u6cc9\u30fb\u90f5\u653f\u89e3\u6563\u5287\u306e\u8a55\u5224 &#8211; nikkeibp.jp &#8211; \u7acb\u82b1\u9686\u306e\u300c\u30e1\u30c7\u30a3\u30a2 \u30bd\u30b7\u30aa-\u30dd\u30ea\u30c6\u30a3\u30af\u30b9\u300d&#8221;), (null,&#8221;\u307b\u305d\u306e\u65e5\u8a18 &#8211; \u30d5\u30a9\u30fc\u30e0\u304c\u5909\u66f4\u3055\u308c\u305f\u4e8b\u3092\u77e5\u308b&#8221;), (null,&#8221;\u7dcf\u9078\u6319\u306f\u3066\u306a\u3068\u516c\u8077\u9078\u6319\u6cd5:\u5317\u6d77\u9053\u306b\u4f4f\u3080\u56fd\u5bb6\u516c\u52d9\u54e1\u65e5\u8a18 &#8220;), (null,&#8221;\u306f\u3066\u306a\u3001\u653f\u515a\u3092\u682a\u5f0f\u306b\u898b\u7acb\u3066\u3066\u7dcf\u9078\u6319\u7d50\u679c\u3092\u4e88\u6e2c &#8211; CNET Japan&#8221;);<br \/>\nmysql> select * from articles where match (body) against (&#8216;mixi&#8217;);<br \/>\n+&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br \/>\n| id | body                                                                                                          |<br \/>\n+&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br \/>\n|  5 | mixi\u975e\u516c\u5f0f\u30cb\u30e5\u30fc\u30b9\u30b5\u30a4\u30c8 &#8211; mixi\u306e\u554f\u984c\u4eba\u7269Kusakabe\u6c0f\u3001\u5f37\u5236\u9000\u4f1a\u306b\uff1f                                             |<br \/>\n| 10 | Kusakabe\u3055\u3093\u304cmixi\u306e\u4e00\u90e8\uff1f\u3092\u8cd1\u308f\u3057\u3066\u3044\u308b\u3002\u5f7c\u306bmixi\u5f37\u5236\u9000\u4f1a\u304c\u8a00\u3044\u6e21\u3055\u308c\u305f\u306e\u3060\u3002                                |<br \/>\n+&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br \/>\n2 rows in set (0.00 sec)<br \/>\n\u5168\u6587\u691c\u7d22\u304c\u3067\u304d\u308b\u3053\u3068\u3092\u78ba\u8a8d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>senna\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u3001\u30d1\u30c3\u30c1\u3092\u5f53\u3066\u3066<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,12],"tags":[],"class_list":["post-199","post","type-post","status-publish","format-standard","hentry","category-linux","category-mysql"],"_links":{"self":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/posts\/199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/comments?post=199"}],"version-history":[{"count":0,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/posts\/199\/revisions"}],"wp:attachment":[{"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/media?parent=199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/categories?post=199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/deskplate.net\/blog\/wp-json\/wp\/v2\/tags?post=199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}