[Groonga-commit] groonga/groonga at 18a1c16 [master] test select: add tests for 4-items by column of section

Back to archive index

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


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

  New Revision: 18a1c1610badba7ad1d5da08b7c4ad758da487d2
  https://github.com/groonga/groonga/commit/18a1c1610badba7ad1d5da08b7c4ad758da487d2

  Merged cf26fb5: Merge pull request #319 from groonga/test-select-add-tests-for-4-items-by-column-of-section

  Message:
    test select: add tests for 4-items by column of section

  Added files:
    test/command/suite/select/match_columns/section/by_column/4_items/ascending.expected
    test/command/suite/select/match_columns/section/by_column/4_items/ascending.test
    test/command/suite/select/match_columns/section/by_column/4_items/descending.expected
    test/command/suite/select/match_columns/section/by_column/4_items/descending.test

  Added: test/command/suite/select/match_columns/section/by_column/4_items/ascending.expected (+58 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/match_columns/section/by_column/4_items/ascending.expected    2015-03-18 11:07:02 +0900 (2801858)
@@ -0,0 +1,58 @@
+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]
+column_create Memos comment COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+column_create Memos category 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
+[[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"]
+]
+[[0,0.0,0.0],5]
+select Memos   --match_columns title||content||comment||category   --query Rroonga   --output_columns "title, content, _score"
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        1
+      ],
+      [
+        [
+          "title",
+          "ShortText"
+        ],
+        [
+          "content",
+          "ShortText"
+        ],
+        [
+          "_score",
+          "Int32"
+        ]
+      ],
+      [
+        "Rroonga",
+        "Start Rroonga!",
+        4
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/match_columns/section/by_column/4_items/ascending.test (+24 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/match_columns/section/by_column/4_items/ascending.test    2015-03-18 11:07:02 +0900 (d17ca96)
@@ -0,0 +1,24 @@
+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
+
+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
+
+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"]
+]
+
+select Memos \
+  --match_columns title||content||comment||category \
+  --query Rroonga \
+  --output_columns "title, content, _score"

  Added: test/command/suite/select/match_columns/section/by_column/4_items/descending.expected (+58 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/match_columns/section/by_column/4_items/descending.expected    2015-03-18 11:07:02 +0900 (e598a96)
@@ -0,0 +1,58 @@
+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]
+column_create Memos comment COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+column_create Memos category 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
+[[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"]
+]
+[[0,0.0,0.0],5]
+select Memos   --match_columns category||comment||content||title   --query Rroonga   --output_columns "title, content, _score"
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        1
+      ],
+      [
+        [
+          "title",
+          "ShortText"
+        ],
+        [
+          "content",
+          "ShortText"
+        ],
+        [
+          "_score",
+          "Int32"
+        ]
+      ],
+      [
+        "Rroonga",
+        "Start Rroonga!",
+        4
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/match_columns/section/by_column/4_items/descending.test (+24 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/match_columns/section/by_column/4_items/descending.test    2015-03-18 11:07:02 +0900 (8ca4555)
@@ -0,0 +1,24 @@
+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
+
+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
+
+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"]
+]
+
+select Memos \
+  --match_columns category||comment||content||title \
+  --query Rroonga \
+  --output_columns "title, content, _score"
-------------- next part --------------
HTML����������������������������...
Download 



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