Yasuhiro Horimoto
null+****@clear*****
Wed May 23 14:52:02 JST 2018
Yasuhiro Horimoto 2018-05-23 14:52:02 +0900 (Wed, 23 May 2018) New Revision: 9574280d26fe47c9941fb791b9565a7670287e73 https://github.com/groonga/groonga/commit/9574280d26fe47c9941fb791b9565a7670287e73 Merged ff3572b: Merge pull request #847 from komainu8/add_test_for_grn_table_select Message: test: add a test for grn_table_select optimization for a case that needs any temporary table Added files: test/command/suite/select/filter/query/or.expected test/command/suite/select/filter/query/or.test Added: test/command/suite/select/filter/query/or.expected (+28 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/filter/query/or.expected 2018-05-23 14:52:02 +0900 (f59c0f3b4) @@ -0,0 +1,28 @@ +table_create Documents TABLE_NO_KEY +[[0,0.0,0.0],true] +column_create Documents content COLUMN_SCALAR Text +[[0,0.0,0.0],true] +table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto +[[0,0.0,0.0],true] +column_create Terms documents_content_index COLUMN_INDEX|WITH_POSITION Documents content +[[0,0.0,0.0],true] +table_create Users TABLE_NO_KEY +[[0,0.0,0.0],true] +column_create Users name COLUMN_SCALAR ShortText +[[0,0.0,0.0],true] +column_create Users memo COLUMN_SCALAR ShortText +[[0,0.0,0.0],true] +table_create Lexicon TABLE_HASH_KEY ShortText --default_tokenizer TokenBigramSplitSymbolAlphaDigit --normalizer NormalizerAuto +[[0,0.0,0.0],true] +column_create Lexicon users_name COLUMN_INDEX|WITH_POSITION Users name +[[0,0.0,0.0],true] +column_create Lexicon users_memo COLUMN_INDEX|WITH_POSITION Users memo +[[0,0.0,0.0],true] +load --table Users +[ +{"name": "Alice", "memo": "groonga user"}, +{"name": "Bob", "memo": "rroonga user"} +] +[[0,0.0,0.0],2] +select Users --output_columns _score --filter "memo @ \"groonga\" && query(\"name*10\", \"alice OR bob\")" +[[0,0.0,0.0],[[[1],[["_score","Int32"]],[11]]]] Added: test/command/suite/select/filter/query/or.test (+27 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/filter/query/or.test 2018-05-23 14:52:02 +0900 (593040644) @@ -0,0 +1,27 @@ +table_create Documents TABLE_NO_KEY +column_create Documents content COLUMN_SCALAR Text + +table_create Terms TABLE_PAT_KEY ShortText \ + --default_tokenizer TokenBigram \ + --normalizer NormalizerAuto +column_create Terms documents_content_index COLUMN_INDEX|WITH_POSITION Documents content + +table_create Users TABLE_NO_KEY +column_create Users name COLUMN_SCALAR ShortText +column_create Users memo COLUMN_SCALAR ShortText + +table_create Lexicon TABLE_HASH_KEY ShortText \ + --default_tokenizer TokenBigramSplitSymbolAlphaDigit \ + --normalizer NormalizerAuto +column_create Lexicon users_name COLUMN_INDEX|WITH_POSITION Users name +column_create Lexicon users_memo COLUMN_INDEX|WITH_POSITION Users memo + +load --table Users +[ +{"name": "Alice", "memo": "groonga user"}, +{"name": "Bob", "memo": "rroonga user"} +] + +select Users \ + --output_columns _score \ + --filter "memo @ \"groonga\" && query(\"name*10\", \"alice OR bob\")" -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180523/00cd2a5d/attachment-0001.htm