[Groonga-commit] groonga/groonga at f222edd [test-select-add-tests-for-mix-weight-by-index-of-section] test select: use different number of words for each column

Back to archive index

Masafumi Yokoyama null+****@clear*****
Wed Mar 18 18:47:07 JST 2015


Masafumi Yokoyama	2015-03-18 18:47:07 +0900 (Wed, 18 Mar 2015)

  New Revision: f222eddfbb9670ffe4b8887d66ad715b5b5063b2
  https://github.com/groonga/groonga/commit/f222eddfbb9670ffe4b8887d66ad715b5b5063b2

  Message:
    test select: use different number of words for each column

  Modified files:
    test/command/suite/select/match_columns/section/by_index/4_items/first_weight.expected
    test/command/suite/select/match_columns/section/by_index/4_items/first_weight.test

  Modified: test/command/suite/select/match_columns/section/by_index/4_items/first_weight.expected (+25 -17)
===================================================================
--- test/command/suite/select/match_columns/section/by_index/4_items/first_weight.expected    2015-03-18 17:47:48 +0900 (8c133f2)
+++ test/command/suite/select/match_columns/section/by_index/4_items/first_weight.expected    2015-03-18 18:47:07 +0900 (6883105)
@@ -1,28 +1,26 @@
 table_create Memos TABLE_NO_KEY
 [[0,0.0,0.0],true]
-column_create Memos title COLUMN_SCALAR ShortText
+column_create Memos column1 COLUMN_SCALAR ShortText
 [[0,0.0,0.0],true]
-column_create Memos content COLUMN_SCALAR ShortText
+column_create Memos column2 COLUMN_SCALAR ShortText
 [[0,0.0,0.0],true]
-column_create Memos comment COLUMN_SCALAR ShortText
+column_create Memos column3 COLUMN_SCALAR ShortText
 [[0,0.0,0.0],true]
-column_create Memos category COLUMN_SCALAR ShortText
+column_create Memos column4 COLUMN_SCALAR ShortText
 [[0,0.0,0.0],true]
 table_create Lexicon TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram
 [[0,0.0,0.0],true]
-column_create Lexicon memo_index COLUMN_INDEX|WITH_POSITION|WITH_SECTION   Memos title,content,comment,category
+column_create Lexicon memo_index COLUMN_INDEX|WITH_POSITION|WITH_SECTION   Memos column1,column2,column3,column4
 [[0,0.0,0.0],true]
 load --table Memos
 [
-["title", "content", "comment", "category"],
-["Groonga", "Start Groonga!", "Groonga!", "Groonga"],
-["Mroonga", "Start Mroonga!", "Mroonga!", "Mroonga"],
-["Rroonga", "Start Rroonga!", "Rroonga!", "Rroonga"],
-["Ruby", "Start Ruby!", "Ruby!", "Ruby"],
-["learn", "Learning Ruby and Groonga...", "learn!", "learn"]
+["column1", "column2", "column3", "column4"],
+["Groonga", "Groonga Groonga", "Groonga Groonga Groonga", "Groonga Groonga Groonga Groonga"],
+["Mroonga", "Mroonga Mroonga", "Mroonga Mroonga Mroonga", "Mroonga Mroonga Mroonga Mroonga"],
+["Rroonga", "Rroonga Rroonga", "Rroonga Rroonga Rroonga", "Rroonga Rroonga Rroonga Rroonga"]
 ]
-[[0,0.0,0.0],5]
-select Memos   --match_columns "Lexicon.memo_index[0] * 10 || Lexicon.memo_index[1] || Lexicon.memo_index[2] || Lexicon.memo_index[3]"   --query Rroonga   --output_columns "title, content, _score"
+[[0,0.0,0.0],3]
+select Memos   --match_columns "Lexicon.memo_index[0] * 10 || Lexicon.memo_index[1] || Lexicon.memo_index[2] || Lexicon.memo_index[3]"   --query Rroonga   --output_columns "column1, column2, column3, column4, _score"
 [
   [
     0,
@@ -36,11 +34,19 @@ select Memos   --match_columns "Lexicon.memo_index[0] * 10 || Lexicon.memo_index
       ],
       [
         [
-          "title",
+          "column1",
           "ShortText"
         ],
         [
-          "content",
+          "column2",
+          "ShortText"
+        ],
+        [
+          "column3",
+          "ShortText"
+        ],
+        [
+          "column4",
           "ShortText"
         ],
         [
@@ -50,8 +56,10 @@ select Memos   --match_columns "Lexicon.memo_index[0] * 10 || Lexicon.memo_index
       ],
       [
         "Rroonga",
-        "Start Rroonga!",
-        13
+        "Rroonga Rroonga",
+        "Rroonga Rroonga Rroonga",
+        "Rroonga Rroonga Rroonga Rroonga",
+        19
       ]
     ]
   ]

  Modified: test/command/suite/select/match_columns/section/by_index/4_items/first_weight.test (+10 -12)
===================================================================
--- test/command/suite/select/match_columns/section/by_index/4_items/first_weight.test    2015-03-18 17:47:48 +0900 (d8ea6f4)
+++ test/command/suite/select/match_columns/section/by_index/4_items/first_weight.test    2015-03-18 18:47:07 +0900 (d2a46a8)
@@ -1,24 +1,22 @@
 table_create Memos TABLE_NO_KEY
-column_create Memos title COLUMN_SCALAR ShortText
-column_create Memos content COLUMN_SCALAR ShortText
-column_create Memos comment COLUMN_SCALAR ShortText
-column_create Memos category COLUMN_SCALAR ShortText
+column_create Memos column1 COLUMN_SCALAR ShortText
+column_create Memos column2 COLUMN_SCALAR ShortText
+column_create Memos column3 COLUMN_SCALAR ShortText
+column_create Memos column4 COLUMN_SCALAR ShortText
 
 table_create Lexicon TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram
 column_create Lexicon memo_index COLUMN_INDEX|WITH_POSITION|WITH_SECTION \
-  Memos title,content,comment,category
+  Memos column1,column2,column3,column4
 
 load --table Memos
 [
-["title", "content", "comment", "category"],
-["Groonga", "Start Groonga!", "Groonga!", "Groonga"],
-["Mroonga", "Start Mroonga!", "Mroonga!", "Mroonga"],
-["Rroonga", "Start Rroonga!", "Rroonga!", "Rroonga"],
-["Ruby", "Start Ruby!", "Ruby!", "Ruby"],
-["learn", "Learning Ruby and Groonga...", "learn!", "learn"]
+["column1", "column2", "column3", "column4"],
+["Groonga", "Groonga Groonga", "Groonga Groonga Groonga", "Groonga Groonga Groonga Groonga"],
+["Mroonga", "Mroonga Mroonga", "Mroonga Mroonga Mroonga", "Mroonga Mroonga Mroonga Mroonga"],
+["Rroonga", "Rroonga Rroonga", "Rroonga Rroonga Rroonga", "Rroonga Rroonga Rroonga Rroonga"]
 ]
 
 select Memos \
   --match_columns "Lexicon.memo_index[0] * 10 || Lexicon.memo_index[1] || Lexicon.memo_index[2] || Lexicon.memo_index[3]" \
   --query Rroonga \
-  --output_columns "title, content, _score"
+  --output_columns "column1, column2, column3, column4, _score"
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index