[Senna-dev 472] Re: なぜ全文検索ができません。

Back to archive index

Tasuku SUENAGA a****@razil*****
2007年 2月 16日 (金) 22:12:42 JST


$BKv1J$G$9!#$3$s$P$s$O!#(B

$B$*$=$i$/!"(B
1. MeCab$B$,(Binstall$B$5$l$F$$$J$$(B
   (--without-mecab$B$G%3%s%Q%$%k(B)
2. MeCab$B$N<-=q$,(Binstall$B$5$l$F$$$J$$(B
3. MeCab$B$N<-=q$NJ8;z%3!<%I$,(B
   /var/senna/senna.conf$B$N(BDEFAULT_ENCODING$B$H0[$J$k(B
$B$H$$$C$?860x$@$H9M$($i$l$^$9!#(B

$B>e5-$r%A%'%C%/$7$F$_$F$/$@$5$$!#(B

$B$A$J$_$K!"(B
$BF|K\8l0J30$N8 @ 8l$r8!:w$9$k>l9g$K$O(BN-gram$B$,$*4+$a$G$9!#(B
Senna$B$N(BN-gram$B$O!"(B
$B1QC18l$O(BN$BJ8;z$GJ,3d$9$k$3$H$J$/!"C18lC10L$GG'<1$7$^$9!#(B

zuoyi_neuso****@yahoo***** wrote:
> $BF|Ln$5$s!"$3$s$P$s$O!#(B
>   $B$4JV;v$"$j$,$H$&$4$6$$$^$9!#(B
>   $B:85#$H?=$7$^$9!#(B
>   $B;d$O(Bsenna$B$r$O$8$a$F;H$$$^$9!#?7?M$G$9!#$h$m$7$/$*4j$$$$$?$7$^$9!#(B
>    
>   $BA0$K<+J,$G$d$C$F$_$F!"(B
>   $B-!(B
>   mysql> CREATE TABLE articles (
>     ->   id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
>     ->   title VARCHAR(200),
>     ->   body TEXT,
>     ->   FULLTEXT (title,body)
>     -> );
>   $B-"(B
>   mysql> CREATE TABLE articles (
>     ->   id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
>     ->   title VARCHAR(200),
>     ->   body TEXT,
>     ->   FULLTEXT INDEX USING NGRAM (title,body)
>     -> );
>    
>   $B-!$GA4J88!:w$r9T$C$?$i!"7k2L$,$J$$$G$9!#(B
>   $B-"$GA4J88!:w$r9T$C$?$i!"7k2L$,=P$FMh$^$9!#(B
>    
>   $B860x$O$?$V$s!V(BINDEX USING NGRAM$B!W$@$H;W$$$^$9!#(B
>   
> 
> Akiko Hino <hino_akiko****@cyber*****> wrote:
>   
> zuoyi_neusoft $B$5$s(B
> # $B$*L>A0$"$k$H8F$S$d$9$$$G$9(B
> 
> $BF|Ln$G$9!#$3$s$P$s$O!#(B
> $B%P!<%8%g%sF1$8$b2?$+$N1o$H$$$&$3$H$G(B
> zuoyi_neusoft $B$5$s$N;n$5$l$?(B SQL $BJ8<B9T$7$F$_$^$7$?!#(B
> 
> $B;d$N4D6-$G$OBg>fIW$G$7$?!#(B
> 
> $B%$%s%G%C%/%9$r:n @ .$9$k:]$NJ8;z%3!<%I$N;XDj$,(B
> DB $B$NJ8;z%3!<%I$H9g$C$F$$$J$+$C$?$j$7$^$;$s$+!#(B
> 
> $B%$%s%9%H!<%k @ bL@=q(B
> $B!!(Bhttp://qwik.jp/senna/install.html
> "2) senna$B$N%$%s%9%H!<%k(B" $B$N9`$K(B EUC $B$G$J$$J8;z%3!<%I$r;HMQ$9$k>l9g$N(B
> $BJ8;z%3!<%I;XDjJ}K!$,=q$+$l$F$$$^$9!#$3$NJ8;z%3!<%I$H!"(B
> $B!!(Bmysql> status 
> $B$G8+$i$l$kJ8;z%3!<%I>H$i$79g$o$;$F$_$k$H(B
> $B2?$+$N%R%s%H$K$J$k$+$b$7$l$^$;$s!#(B
> 
> $B @ lLg$G$O$J$/E, @ Z$JEz$($+$I$&$+<+?.$"$j$^$;$s!#(B
> $B5DO@$r$+$-2s$7$F$7$^$C$F$$$?$i$9$_$^$;$s!#(B
> 
> $B$*Lr$KN)$F$l$P9,$$$G$9!#$h$m$7$/$*4j$$$7$^$9!#(B
> 
> 
> --- $BD>$k<j=u$1$K$O$J$i$J$$$N$G$9$,<B9T7k2LE=$C$F$*$-$^$9(B ---
> 
> mysql> use test
> Database changed
> mysql> CREATE TABLE articles (
> -> y TEXT,
> FULLTEXT (title,body)
> );id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
> -> title VARCHAR(200),
> -> body TEXT,
> -> FULLTEXT (title,body)
> -> );
> Query OK, 0 rows affected (0.00 sec)
> 
> mysql> describe articles ;
> +-------+------------------+------+-----+---------+----------------+
> | Field | Type | Null | Key | Default | Extra |
> +-------+------------------+------+-----+---------+----------------+
> | id | int(10) unsigned | NO | PRI | NULL | auto_increment |
> | title | varchar(200) | YES | MUL | NULL | |
> | body | text | YES | | NULL | |
> +-------+------------------+------+-----+---------+----------------+
> 3 rows in set (0.00 sec)
> 
> mysql> INSERT INTO articles (title,body) VALUES
> -> ('MySQL Tutorial','DBMS stands for DataBase ...'),
> -> ('How To Use MySQL Well','After you went through a ...'),
> -> ('Optimizing MySQL','In this tutorial we will show ...'),
> -> ('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),
> -> ('MySQL vs. YourSQL','In the following database comparison ...'),
> -> ('MySQL Security','When configured properly, MySQL ...');
> Query OK, 6 rows affected (0.01 sec)
> Records: 6 Duplicates: 0 Warnings: 0
> 
> mysql> SELECT * FROM articles WHERE MATCH (title,body) AGAINST ('database');
> +----+-------------------+------------------------------------------+
> | id | title | body |
> +----+-------------------+------------------------------------------+
> | 1 | MySQL Tutorial | DBMS stands for DataBase ... |
> | 5 | MySQL vs. YourSQL | In the following database comparison ... |
> +----+-------------------+------------------------------------------+
> 2 rows in set (0.00 sec)
---
Tasuku SUENAGA <a****@razil*****>



Senna-dev メーリングリストの案内
Back to archive index