[Groonga-commit] groonga/groonga at 1b162e0 [master] test select: add tests for 2-items by column of section

Back to archive index

Masafumi Yokoyama null+****@clear*****
Fri Mar 13 11:07:38 JST 2015


Masafumi Yokoyama	2015-03-13 11:07:38 +0900 (Fri, 13 Mar 2015)

  New Revision: 1b162e05d38c30a12a10ebb90c1911c9fcf8b6d7
  https://github.com/groonga/groonga/commit/1b162e05d38c30a12a10ebb90c1911c9fcf8b6d7

  Merged b36cc11: Merge pull request #315 from groonga/test-select-add-tests-for-2-items-by-column-of-section

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

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

  Added: test/command/suite/select/match_columns/section/by_column/2_items/ascending.expected (+54 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/match_columns/section/by_column/2_items/ascending.expected    2015-03-13 11:07:38 +0900 (6e89fe4)
@@ -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 title||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_column/2_items/ascending.test (+22 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/match_columns/section/by_column/2_items/ascending.test    2015-03-13 11:07:38 +0900 (246e5a0)
@@ -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 title||content \
+  --query Rroonga \
+  --output_columns "title, content, _score"

  Added: test/command/suite/select/match_columns/section/by_column/2_items/descending.expected (+54 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/match_columns/section/by_column/2_items/descending.expected    2015-03-13 11:07:38 +0900 (ce992f2)
@@ -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 content||title   --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_column/2_items/descending.test (+22 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/match_columns/section/by_column/2_items/descending.test    2015-03-13 11:07:38 +0900 (16107e9)
@@ -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 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