Kouhei Sutou
null+****@clear*****
Fri Nov 9 14:47:43 JST 2012
Kouhei Sutou 2012-11-09 14:47:43 +0900 (Fri, 09 Nov 2012) New Revision: 9e4e9b1c3695b2b390f3c02dab942133573b4f04 https://github.com/groonga/groonga/commit/9e4e9b1c3695b2b390f3c02dab942133573b4f04 Log: Add tests for TokenDelimit Added files: test/command/suite/table_create/default_tokenizer/delimit/default.expected test/command/suite/table_create/default_tokenizer/delimit/default.test test/command/suite/table_create/default_tokenizer/delimit/normalize.expected test/command/suite/table_create/default_tokenizer/delimit/normalize.test Added: test/command/suite/table_create/default_tokenizer/delimit/default.expected (+50 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/table_create/default_tokenizer/delimit/default.expected 2012-11-09 14:47:43 +0900 (8ec2d55) @@ -0,0 +1,50 @@ +table_create Tags TABLE_PAT_KEY ShortText --default_tokenizer TokenDelimit +[[0,0.0,0.0],true] +table_create Movies TABLE_HASH_KEY ShortText +[[0,0.0,0.0],true] +column_create Movies tags COLUMN_VECTOR Tags +[[0,0.0,0.0],true] +column_create Tags movies_tags COLUMN_INDEX Movies tags +[[0,0.0,0.0],true] +load --table Movies +[ +{"_key": "Seven Samurai", tags: "Samurai Japanese Japan"}, +{"_key": "The Last Samurai", tags: "Samurai English Japanese US Japan"} +] +[[0,0.0,0.0],2] +select Tags --output_columns _key --limit -1 +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 5 + ], + [ + [ + "_key", + "ShortText" + ] + ], + [ + "English" + ], + [ + "Japan" + ], + [ + "Japanese" + ], + [ + "Samurai" + ], + [ + "US" + ] + ] + ] +] Added: test/command/suite/table_create/default_tokenizer/delimit/default.test (+15 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/table_create/default_tokenizer/delimit/default.test 2012-11-09 14:47:43 +0900 (ce21d70) @@ -0,0 +1,15 @@ +table_create Tags TABLE_PAT_KEY ShortText \ + --default_tokenizer TokenDelimit + +table_create Movies TABLE_HASH_KEY ShortText +column_create Movies tags COLUMN_VECTOR Tags + +column_create Tags movies_tags COLUMN_INDEX Movies tags + +load --table Movies +[ +{"_key": "Seven Samurai", tags: "Samurai Japanese Japan"}, +{"_key": "The Last Samurai", tags: "Samurai English Japanese US Japan"} +] + +select Tags --output_columns _key --limit -1 Added: test/command/suite/table_create/default_tokenizer/delimit/normalize.expected (+50 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/table_create/default_tokenizer/delimit/normalize.expected 2012-11-09 14:47:43 +0900 (841c450) @@ -0,0 +1,50 @@ +table_create Tags TABLE_PAT_KEY|KEY_NORMALIZE ShortText --default_tokenizer TokenDelimit +[[0,0.0,0.0],true] +table_create Movies TABLE_HASH_KEY ShortText +[[0,0.0,0.0],true] +column_create Movies tags COLUMN_VECTOR Tags +[[0,0.0,0.0],true] +column_create Tags movies_tags COLUMN_INDEX Movies tags +[[0,0.0,0.0],true] +load --table Movies +[ +{"_key": "Seven Samurai", tags: "Samurai Japanese Japan"}, +{"_key": "The Last Samurai", tags: "Samurai English Japanese US Japan"} +] +[[0,0.0,0.0],2] +select Tags --output_columns _key --limit -1 +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 5 + ], + [ + [ + "_key", + "ShortText" + ] + ], + [ + "english" + ], + [ + "japan" + ], + [ + "japanese" + ], + [ + "samurai" + ], + [ + "us" + ] + ] + ] +] Added: test/command/suite/table_create/default_tokenizer/delimit/normalize.test (+15 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/table_create/default_tokenizer/delimit/normalize.test 2012-11-09 14:47:43 +0900 (96fe7de) @@ -0,0 +1,15 @@ +table_create Tags TABLE_PAT_KEY|KEY_NORMALIZE ShortText \ + --default_tokenizer TokenDelimit + +table_create Movies TABLE_HASH_KEY ShortText +column_create Movies tags COLUMN_VECTOR Tags + +column_create Tags movies_tags COLUMN_INDEX Movies tags + +load --table Movies +[ +{"_key": "Seven Samurai", tags: "Samurai Japanese Japan"}, +{"_key": "The Last Samurai", tags: "Samurai English Japanese US Japan"} +] + +select Tags --output_columns _key --limit -1 -------------- next part -------------- HTML����������������������������... 다운로드