Kouhei Sutou
null+****@clear*****
Thu Mar 12 22:08:50 JST 2015
Kouhei Sutou 2015-03-12 22:08:50 +0900 (Thu, 12 Mar 2015) New Revision: 2267d0bb49f592539b6c933ec210f8e19e3c0bc2 https://github.com/groonga/groonga/commit/2267d0bb49f592539b6c933ec210f8e19e3c0bc2 Message: test TokenRegexp: add tests for regexp search by index Added files: test/command/suite/select/filter/index/regexp/begin.expected test/command/suite/select/filter/index/regexp/begin.test test/command/suite/select/filter/index/regexp/end.expected test/command/suite/select/filter/index/regexp/end.test Added: test/command/suite/select/filter/index/regexp/begin.expected (+17 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/filter/index/regexp/begin.expected 2015-03-12 22:08:50 +0900 (ba5f8d9) @@ -0,0 +1,17 @@ +table_create Memos TABLE_NO_KEY +[[0,0.0,0.0],true] +column_create Memos content COLUMN_SCALAR Text +[[0,0.0,0.0],true] +table_create RegexpTokens TABLE_PAT_KEY ShortText --default_tokenizer TokenRegexp +[[0,0.0,0.0],true] +column_create RegexpTokens memos_content COLUMN_INDEX|WITH_POSITION Memos content +[[0,0.0,0.0],true] +load --table Memos +[ +{"content": "Groonga"}, +{"content": "Rroonga"}, +{"content": "Ruby and Rroonga"} +] +[[0,0.0,0.0],3] +select Memos --filter 'content @~ "\\\\ARro"' +[[0,0.0,0.0],[[[1],[["_id","UInt32"],["content","Text"]],[2,"Rroonga"]]]] Added: test/command/suite/select/filter/index/regexp/begin.test (+16 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/filter/index/regexp/begin.test 2015-03-12 22:08:50 +0900 (c5baeff) @@ -0,0 +1,16 @@ +table_create Memos TABLE_NO_KEY +column_create Memos content COLUMN_SCALAR Text + +table_create RegexpTokens TABLE_PAT_KEY ShortText \ + --default_tokenizer TokenRegexp +column_create RegexpTokens memos_content COLUMN_INDEX|WITH_POSITION \ + Memos content + +load --table Memos +[ +{"content": "Groonga"}, +{"content": "Rroonga"}, +{"content": "Ruby and Rroonga"} +] + +select Memos --filter 'content @~ "\\\\ARro"' Added: test/command/suite/select/filter/index/regexp/end.expected (+48 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/filter/index/regexp/end.expected 2015-03-12 22:08:50 +0900 (516ec88) @@ -0,0 +1,48 @@ +table_create Memos TABLE_NO_KEY +[[0,0.0,0.0],true] +column_create Memos content COLUMN_SCALAR Text +[[0,0.0,0.0],true] +table_create RegexpTokens TABLE_PAT_KEY ShortText --default_tokenizer TokenRegexp +[[0,0.0,0.0],true] +column_create RegexpTokens memos_content COLUMN_INDEX|WITH_POSITION Memos content +[[0,0.0,0.0],true] +load --table Memos +[ +{"content": "Groonga"}, +{"content": "Mroonga"}, +{"content": "Rroonga and Ruby"} +] +[[0,0.0,0.0],3] +select Memos --filter 'content @~ "onga\\\\z"' +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 2 + ], + [ + [ + "_id", + "UInt32" + ], + [ + "content", + "Text" + ] + ], + [ + 1, + "Groonga" + ], + [ + 2, + "Mroonga" + ] + ] + ] +] Added: test/command/suite/select/filter/index/regexp/end.test (+16 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/filter/index/regexp/end.test 2015-03-12 22:08:50 +0900 (f244d54) @@ -0,0 +1,16 @@ +table_create Memos TABLE_NO_KEY +column_create Memos content COLUMN_SCALAR Text + +table_create RegexpTokens TABLE_PAT_KEY ShortText \ + --default_tokenizer TokenRegexp +column_create RegexpTokens memos_content COLUMN_INDEX|WITH_POSITION \ + Memos content + +load --table Memos +[ +{"content": "Groonga"}, +{"content": "Mroonga"}, +{"content": "Rroonga and Ruby"} +] + +select Memos --filter 'content @~ "onga\\\\z"' -------------- next part -------------- HTML����������������������������...Download