null+****@clear*****
null+****@clear*****
2011年 9月 25日 (日) 09:47:51 JST
Kouhei Sutou 2011-09-25 00:47:51 +0000 (Sun, 25 Sep 2011) New Revision: d4e0e60fcb978a28c0b5e3234a766a0867946033 Log: [storage][test] split fulltext search against ASCII text test. Added files: test/sql/groonga_storage/r/fulltext_search_ascii.result test/sql/groonga_storage/t/fulltext_search_ascii.test Modified files: test/sql/groonga_storage/r/fulltext.result test/sql/groonga_storage/t/fulltext.test Modified: test/sql/groonga_storage/r/fulltext.result (+0 -28) =================================================================== --- test/sql/groonga_storage/r/fulltext.result 2011-09-25 00:45:06 +0000 (5888f32) +++ test/sql/groonga_storage/r/fulltext.result 2011-09-25 00:47:51 +0000 (5d15b78) @@ -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)); -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; insert into t1 values(1, "明日の富士山の天気について","あああああああ"); Added: test/sql/groonga_storage/r/fulltext_search_ascii.result (+29 -0) 100644 =================================================================== --- /dev/null +++ test/sql/groonga_storage/r/fulltext_search_ascii.result 2011-09-25 00:47:51 +0000 (c542ba1) @@ -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)); +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_storage/t/fulltext.test (+0 -13) =================================================================== --- test/sql/groonga_storage/t/fulltext.test 2011-09-25 00:45:06 +0000 (25b382c) +++ test/sql/groonga_storage/t/fulltext.test 2011-09-25 00:47:51 +0000 (1d91ffd) @@ -20,19 +20,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)); -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; insert into t1 values(1, "明日の富士山の天気について","あああああああ"); Added: test/sql/groonga_storage/t/fulltext_search_ascii.test (+36 -0) 100644 =================================================================== --- /dev/null +++ test/sql/groonga_storage/t/fulltext_search_ascii.test 2011-09-25 00:47:51 +0000 (deb5627) @@ -0,0 +1,36 @@ +# Copyright(C) 2010 Tetsuro IKEDA +# +# 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)); +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