Kouhei Sutou
null+****@clear*****
Tue Feb 13 18:15:37 JST 2018
Kouhei Sutou 2018-02-13 18:15:37 +0900 (Tue, 13 Feb 2018) New Revision: f16810834cd6cc28ffa49048a70ae5f56368807e https://github.com/groonga/groonga/commit/f16810834cd6cc28ffa49048a70ae5f56368807e Message: test: add missing quorum match in filter tests Added files: test/command/suite/select/filter/quorum_match/default.expected test/command/suite/select/filter/quorum_match/default.test test/command/suite/select/filter/quorum_match/threshold.expected test/command/suite/select/filter/quorum_match/threshold.test Added: test/command/suite/select/filter/quorum_match/default.expected (+53 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/filter/quorum_match/default.expected 2018-02-13 18:15:37 +0900 (a0f9770ab) @@ -0,0 +1,53 @@ +table_create Paragraphs TABLE_NO_KEY +[[0,0.0,0.0],true] +column_create Paragraphs content COLUMN_SCALAR Text +[[0,0.0,0.0],true] +table_create Words TABLE_PAT_KEY ShortText --default_tokenizer TokenDelimit --normalizer NormalizerAuto +[[0,0.0,0.0],true] +column_create Words index COLUMN_INDEX Paragraphs content +[[0,0.0,0.0],true] +load --table Paragraphs +[ +{"content": "Groonga is a full text search engine"}, +{"content": "Mroonga is a MySQL storage engine"}, +{"content": "PGroonga is an full text search extension for PostgreSQL"}, +{"content": "Rroonga is a Ruby bindings of GroongaL"} +] +[[0,0.0,0.0],4] +select Paragraphs --filter 'content *Q "search engine MySQL"' --output_columns content,_score +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 3 + ], + [ + [ + "content", + "Text" + ], + [ + "_score", + "Int32" + ] + ], + [ + "Groonga is a full text search engine", + 2 + ], + [ + "PGroonga is an full text search extension for PostgreSQL", + 1 + ], + [ + "Mroonga is a MySQL storage engine", + 2 + ] + ] + ] +] Added: test/command/suite/select/filter/quorum_match/default.test (+19 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/filter/quorum_match/default.test 2018-02-13 18:15:37 +0900 (b416652fd) @@ -0,0 +1,19 @@ +table_create Paragraphs TABLE_NO_KEY +column_create Paragraphs content COLUMN_SCALAR Text + +table_create Words TABLE_PAT_KEY ShortText \ + --default_tokenizer TokenDelimit \ + --normalizer NormalizerAuto +column_create Words index COLUMN_INDEX Paragraphs content + +load --table Paragraphs +[ +{"content": "Groonga is a full text search engine"}, +{"content": "Mroonga is a MySQL storage engine"}, +{"content": "PGroonga is an full text search extension for PostgreSQL"}, +{"content": "Rroonga is a Ruby bindings of GroongaL"} +] + +select Paragraphs \ + --filter 'content *Q "search engine MySQL"' \ + --output_columns content,_score Added: test/command/suite/select/filter/quorum_match/threshold.expected (+49 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/filter/quorum_match/threshold.expected 2018-02-13 18:15:37 +0900 (e0574cec6) @@ -0,0 +1,49 @@ +table_create Paragraphs TABLE_NO_KEY +[[0,0.0,0.0],true] +column_create Paragraphs content COLUMN_SCALAR Text +[[0,0.0,0.0],true] +table_create Words TABLE_PAT_KEY ShortText --default_tokenizer TokenDelimit --normalizer NormalizerAuto +[[0,0.0,0.0],true] +column_create Words index COLUMN_INDEX Paragraphs content +[[0,0.0,0.0],true] +load --table Paragraphs +[ +{"content": "Groonga is a full text search engine"}, +{"content": "Mroonga is a MySQL storage engine"}, +{"content": "PGroonga is an full text search extension for PostgreSQL"}, +{"content": "Rroonga is a Ruby bindings of GroongaL"} +] +[[0,0.0,0.0],4] +select Paragraphs --filter 'content *Q2 "search engine MySQL"' --output_columns content,_score +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 2 + ], + [ + [ + "content", + "Text" + ], + [ + "_score", + "Int32" + ] + ], + [ + "Groonga is a full text search engine", + 2 + ], + [ + "Mroonga is a MySQL storage engine", + 2 + ] + ] + ] +] Added: test/command/suite/select/filter/quorum_match/threshold.test (+19 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/filter/quorum_match/threshold.test 2018-02-13 18:15:37 +0900 (d9dd93c65) @@ -0,0 +1,19 @@ +table_create Paragraphs TABLE_NO_KEY +column_create Paragraphs content COLUMN_SCALAR Text + +table_create Words TABLE_PAT_KEY ShortText \ + --default_tokenizer TokenDelimit \ + --normalizer NormalizerAuto +column_create Words index COLUMN_INDEX Paragraphs content + +load --table Paragraphs +[ +{"content": "Groonga is a full text search engine"}, +{"content": "Mroonga is a MySQL storage engine"}, +{"content": "PGroonga is an full text search extension for PostgreSQL"}, +{"content": "Rroonga is a Ruby bindings of GroongaL"} +] + +select Paragraphs \ + --filter 'content *Q2 "search engine MySQL"' \ + --output_columns content,_score -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180213/f7af0b1b/attachment-0001.htm