Susumu Yata
null+****@clear*****
Sat Jul 1 23:22:45 JST 2017
Susumu Yata 2017-07-01 23:22:45 +0900 (Sat, 01 Jul 2017) New Revision: aaa5cf03c321bd4ff1400f727c27e2870465ee30 https://github.com/groonga/groonga/commit/aaa5cf03c321bd4ff1400f727c27e2870465ee30 Message: test: add load/index/online/vector/text GitHub: #494 Added files: test/command/suite/load/index/online/vector/text.expected test/command/suite/load/index/online/vector/text.test Added: test/command/suite/load/index/online/vector/text.expected (+87 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/load/index/online/vector/text.expected 2017-07-01 23:22:45 +0900 (add9d98) @@ -0,0 +1,87 @@ +table_create Docs TABLE_NO_KEY +[[0,0.0,0.0],true] +column_create Docs sentences COLUMN_VECTOR Text +[[0,0.0,0.0],true] +table_create Words TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram +[[0,0.0,0.0],true] +column_create Words docs_sentences COLUMN_INDEX|WITH_POSITION|WITH_SECTION Docs sentences +[[0,0.0,0.0],true] +load --table Docs +[ +{"sentences":["午前中は良く晴れます.", "午後は雨が降ります."]} +] +[[0,0.0,0.0],1] +select Docs --match_columns 'sentences' --query '"午前中"' --output_columns '_id,_score,sentences' +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 1 + ], + [ + [ + "_id", + "UInt32" + ], + [ + "_score", + "Int32" + ], + [ + "sentences", + "Text" + ] + ], + [ + 1, + 1, + [ + "午前中は良く晴れます.", + "午後は雨が降ります." + ] + ] + ] + ] +] +select Docs --match_columns 'sentences' --query '"ります"' --output_columns '_id,_score,sentences' +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 1 + ], + [ + [ + "_id", + "UInt32" + ], + [ + "_score", + "Int32" + ], + [ + "sentences", + "Text" + ] + ], + [ + 1, + 1, + [ + "午前中は良く晴れます.", + "午後は雨が降ります." + ] + ] + ] + ] +] Added: test/command/suite/load/index/online/vector/text.test (+16 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/load/index/online/vector/text.test 2017-07-01 23:22:45 +0900 (027ea0c) @@ -0,0 +1,16 @@ +table_create Docs TABLE_NO_KEY +column_create Docs sentences COLUMN_VECTOR Text + +table_create Words TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram +column_create Words docs_sentences COLUMN_INDEX|WITH_POSITION|WITH_SECTION Docs sentences + +load --table Docs +[ +{"sentences":["午前中は良く晴れます.", "午後は雨が降ります."]} +] + +select Docs --match_columns 'sentences' --query '"午前中"' \ + --output_columns '_id,_score,sentences' + +select Docs --match_columns 'sentences' --query '"ります"' \ + --output_columns '_id,_score,sentences' -------------- next part -------------- HTML����������������������������... Download