[Groonga-commit] groonga/groonga at 4962534 [master] test: add 2-items tests by name of section

Back to archive index

Masafumi Yokoyama null+****@clear*****
Thu Mar 12 16:43:49 JST 2015


Masafumi Yokoyama	2015-03-12 16:43:49 +0900 (Thu, 12 Mar 2015)

  New Revision: 4962534b935f3f5b006da52b8c8a9c407edd9236
  https://github.com/groonga/groonga/commit/4962534b935f3f5b006da52b8c8a9c407edd9236

  Merged 74e4ee3: Merge pull request #310 from groonga/test-add-2-items-tests-by-name-of-section

  Message:
    test: add 2-items tests by name of section

  Added files:
    test/command/suite/select/match_columns/section/by_name/2_items/no_weight.expected
    test/command/suite/select/match_columns/section/by_name/2_items/no_weight.test
    test/command/suite/select/match_columns/section/by_name/2_items/weight.expected
    test/command/suite/select/match_columns/section/by_name/2_items/weight.test

  Added: test/command/suite/select/match_columns/section/by_name/2_items/no_weight.expected (+54 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/match_columns/section/by_name/2_items/no_weight.expected    2015-03-12 16:43:49 +0900 (cb9f3e8)
@@ -0,0 +1,54 @@
+table_create Memos TABLE_NO_KEY
+[[0,0.0,0.0],true]
+column_create Memos title COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+column_create Memos content 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
+[[0,0.0,0.0],true]
+load --table Memos
+[
+["title", "content"],
+["Groonga", "Start Groonga!"],
+["Mroonga", "Start Mroonga!"],
+["Rroonga", "Start Rroonga!"],
+["Ruby", "Start Ruby!"],
+["learn", "Learning Ruby and Groonga..."]
+]
+[[0,0.0,0.0],5]
+select Memos   --match_columns "Lexicon.memo_index.title || Lexicon.memo_index.content"   --query Rroonga   --output_columns "title, content, _score"
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        1
+      ],
+      [
+        [
+          "title",
+          "ShortText"
+        ],
+        [
+          "content",
+          "ShortText"
+        ],
+        [
+          "_score",
+          "Int32"
+        ]
+      ],
+      [
+        "Rroonga",
+        "Start Rroonga!",
+        2
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/match_columns/section/by_name/2_items/no_weight.test (+22 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/match_columns/section/by_name/2_items/no_weight.test    2015-03-12 16:43:49 +0900 (baf0f1b)
@@ -0,0 +1,22 @@
+table_create Memos TABLE_NO_KEY
+column_create Memos title COLUMN_SCALAR ShortText
+column_create Memos content 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
+
+load --table Memos
+[
+["title", "content"],
+["Groonga", "Start Groonga!"],
+["Mroonga", "Start Mroonga!"],
+["Rroonga", "Start Rroonga!"],
+["Ruby", "Start Ruby!"],
+["learn", "Learning Ruby and Groonga..."]
+]
+
+select Memos \
+  --match_columns "Lexicon.memo_index.title || Lexicon.memo_index.content" \
+  --query Rroonga \
+  --output_columns "title, content, _score"

  Added: test/command/suite/select/match_columns/section/by_name/2_items/weight.expected (+54 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/match_columns/section/by_name/2_items/weight.expected    2015-03-12 16:43:49 +0900 (9a37158)
@@ -0,0 +1,54 @@
+table_create Memos TABLE_NO_KEY
+[[0,0.0,0.0],true]
+column_create Memos title COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+column_create Memos content 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
+[[0,0.0,0.0],true]
+load --table Memos
+[
+["title", "content"],
+["Groonga", "Start Groonga!"],
+["Mroonga", "Start Mroonga!"],
+["Rroonga", "Start Rroonga!"],
+["Ruby", "Start Ruby!"],
+["learn", "Learning Ruby and Groonga..."]
+]
+[[0,0.0,0.0],5]
+select Memos   --match_columns "Lexicon.memo_index.title * 10 || Lexicon.memo_index.content * 2"   --query Rroonga   --output_columns "title, content, _score"
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        1
+      ],
+      [
+        [
+          "title",
+          "ShortText"
+        ],
+        [
+          "content",
+          "ShortText"
+        ],
+        [
+          "_score",
+          "Int32"
+        ]
+      ],
+      [
+        "Rroonga",
+        "Start Rroonga!",
+        12
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/match_columns/section/by_name/2_items/weight.test (+22 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/match_columns/section/by_name/2_items/weight.test    2015-03-12 16:43:49 +0900 (abde64c)
@@ -0,0 +1,22 @@
+table_create Memos TABLE_NO_KEY
+column_create Memos title COLUMN_SCALAR ShortText
+column_create Memos content 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
+
+load --table Memos
+[
+["title", "content"],
+["Groonga", "Start Groonga!"],
+["Mroonga", "Start Mroonga!"],
+["Rroonga", "Start Rroonga!"],
+["Ruby", "Start Ruby!"],
+["learn", "Learning Ruby and Groonga..."]
+]
+
+select Memos \
+  --match_columns "Lexicon.memo_index.title * 10 || Lexicon.memo_index.content * 2" \
+  --query Rroonga \
+  --output_columns "title, content, _score"
-------------- next part --------------
HTML����������������������������...
Download 



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