null+****@clear*****
null+****@clear*****
2011年 9月 25日 (日) 09:34:19 JST
Kouhei Sutou 2011-09-25 00:34:19 +0000 (Sun, 25 Sep 2011) New Revision: 6764021eb178caaea1e53b344908dd9b4d9401ca Log: [wrapper][test] split fulltext search test. Added files: test/sql/groonga_wrapper/r/fulltext_search.result test/sql/groonga_wrapper/t/fulltext_search.test Modified files: test/sql/groonga_wrapper/r/fulltext.result test/sql/groonga_wrapper/t/fulltext.test Modified: test/sql/groonga_wrapper/r/fulltext.result (+0 -28) =================================================================== --- test/sql/groonga_wrapper/r/fulltext.result 2011-09-25 00:32:31 +0000 (bfdf988) +++ test/sql/groonga_wrapper/r/fulltext.result 2011-09-25 00:34:19 +0000 (ef24f0e) @@ -1,32 +1,4 @@ drop table if exists t1, t2, t3; -create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)) COMMENT = 'engine "innodb"'; -insert into t1 values(1,10,"aa ii uu ee oo"); -insert into t1 values(2,20,"ka ki ku ke ko"); -insert into t1 values(3,30,"sa si su se so"); -insert into t1 values(4,40,"ta ti tu te to"); -insert into t1 values(5,50,"aa ii uu ee oo"); -select * from t1; -c1 c2 c3 -1 10 aa ii uu ee oo -2 20 ka ki ku ke ko -3 30 sa si su se so -4 40 ta ti tu te to -5 50 aa ii uu ee oo -select * from t1 where match(c3) against("su"); -c1 c2 c3 -3 30 sa si su se so -select * from t1 where match(c3) against("ii"); -c1 c2 c3 -1 10 aa ii uu ee oo -5 50 aa ii uu ee oo -select * from t1 where match(c3) against("+su" in boolean mode); -c1 c2 c3 -3 30 sa si su se so -select * from t1 where match(c3) against("+ii" in boolean mode); -c1 c2 c3 -1 10 aa ii uu ee oo -5 50 aa ii uu ee oo -drop table t1; set names utf8; create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset utf8 COMMENT = 'engine "innodb"'; insert into t1 values(1, "明日の富士山の天気について","あああああああ"); Added: test/sql/groonga_wrapper/r/fulltext_search.result (+29 -0) 100644 =================================================================== --- /dev/null +++ test/sql/groonga_wrapper/r/fulltext_search.result 2011-09-25 00:34:19 +0000 (b58f4ad) @@ -0,0 +1,29 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)) COMMENT = 'engine "innodb"'; +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,20,"ka ki ku ke ko"); +insert into t1 values(3,30,"sa si su se so"); +insert into t1 values(4,40,"ta ti tu te to"); +insert into t1 values(5,50,"aa ii uu ee oo"); +select * from t1; +c1 c2 c3 +1 10 aa ii uu ee oo +2 20 ka ki ku ke ko +3 30 sa si su se so +4 40 ta ti tu te to +5 50 aa ii uu ee oo +select * from t1 where match(c3) against("su"); +c1 c2 c3 +3 30 sa si su se so +select * from t1 where match(c3) against("ii"); +c1 c2 c3 +1 10 aa ii uu ee oo +5 50 aa ii uu ee oo +select * from t1 where match(c3) against("+su" in boolean mode); +c1 c2 c3 +3 30 sa si su se so +select * from t1 where match(c3) against("+ii" in boolean mode); +c1 c2 c3 +1 10 aa ii uu ee oo +5 50 aa ii uu ee oo +drop table t1; Modified: test/sql/groonga_wrapper/t/fulltext.test (+0 -13) =================================================================== --- test/sql/groonga_wrapper/t/fulltext.test 2011-09-25 00:32:31 +0000 (e416455) +++ test/sql/groonga_wrapper/t/fulltext.test 2011-09-25 00:34:19 +0000 (85efed3) @@ -21,19 +21,6 @@ drop table if exists t1, t2, t3; --enable_warnings -create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)) COMMENT = 'engine "innodb"'; -insert into t1 values(1,10,"aa ii uu ee oo"); -insert into t1 values(2,20,"ka ki ku ke ko"); -insert into t1 values(3,30,"sa si su se so"); -insert into t1 values(4,40,"ta ti tu te to"); -insert into t1 values(5,50,"aa ii uu ee oo"); -select * from t1; -select * from t1 where match(c3) against("su"); -select * from t1 where match(c3) against("ii"); -select * from t1 where match(c3) against("+su" in boolean mode); -select * from t1 where match(c3) against("+ii" in boolean mode); -drop table t1; - set names utf8; create table t1 (c1 int primary key, c2 varchar(255), c3 text, fulltext index(c2), fulltext index(c3)) default charset utf8 COMMENT = 'engine "innodb"'; insert into t1 values(1, "明日の富士山の天気について","あああああああ"); Added: test/sql/groonga_wrapper/t/fulltext_search.test (+37 -0) 100644 =================================================================== --- /dev/null +++ test/sql/groonga_wrapper/t/fulltext_search.test 2011-09-25 00:34:19 +0000 (040cbda) @@ -0,0 +1,37 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# Copyright(C) 2011 Kouhei Sutou <kou****@clear*****> +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +--source suite/groonga_include/groonga_init.inc + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings + +create table t1 (c1 int primary key, c2 int, c3 text, fulltext index ft(c3)) COMMENT = 'engine "innodb"'; +insert into t1 values(1,10,"aa ii uu ee oo"); +insert into t1 values(2,20,"ka ki ku ke ko"); +insert into t1 values(3,30,"sa si su se so"); +insert into t1 values(4,40,"ta ti tu te to"); +insert into t1 values(5,50,"aa ii uu ee oo"); +select * from t1; +select * from t1 where match(c3) against("su"); +select * from t1 where match(c3) against("ii"); +select * from t1 where match(c3) against("+su" in boolean mode); +select * from t1 where match(c3) against("+ii" in boolean mode); +drop table t1; + +--source suite/groonga_include/groonga_deinit.inc