[Groonga-commit] groonga/groonga at 75c873c [master] test: add one more AND optimization test

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Jan 16 12:41:33 JST 2017


Kouhei Sutou	2017-01-16 12:41:33 +0900 (Mon, 16 Jan 2017)

  New Revision: 75c873c41138695f92944a3c1290c029b5bac2c8
  https://github.com/groonga/groonga/commit/75c873c41138695f92944a3c1290c029b5bac2c8

  Message:
    test: add one more AND optimization test
    
    It combines MATCH and LESS.

  Added files:
    test/command/suite/select/query/less/with_match.expected
    test/command/suite/select/query/less/with_match.test

  Added: test/command/suite/select/query/less/with_match.expected (+54 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/query/less/with_match.expected    2017-01-16 12:41:33 +0900 (c55813e)
@@ -0,0 +1,54 @@
+table_create Memos TABLE_NO_KEY
+[[0,0.0,0.0],true]
+column_create Memos content COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+column_create Memos created_at COLUMN_SCALAR Time
+[[0,0.0,0.0],true]
+table_create Terms TABLE_HASH_KEY ShortText   --default_tokenizer TokenBigram   --normalizer NormalizerAuto
+[[0,0.0,0.0],true]
+column_create Terms memos_content COLUMN_INDEX|WITH_POSITION Memos content
+[[0,0.0,0.0],true]
+table_create Times TABLE_PAT_KEY Time
+[[0,0.0,0.0],true]
+column_create Times memos_created_at COLUMN_INDEX Memos created_at
+[[0,0.0,0.0],true]
+load --table Memos
+[
+{"content": "Today is a good day.",         "created_at": "2017-01-16 12:00:00"},
+{"content": "Tomorrow will be a good day.", "created_at": "2017-01-17 12:00:00"}
+]
+[[0,0.0,0.0],2]
+select Memos   --match_columns 'content'   --query 'tomorrow created_at:<"2017-01-17 13:00:00" day'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        1
+      ],
+      [
+        [
+          "_id",
+          "UInt32"
+        ],
+        [
+          "content",
+          "ShortText"
+        ],
+        [
+          "created_at",
+          "Time"
+        ]
+      ],
+      [
+        2,
+        "Tomorrow will be a good day.",
+        1484622000.0
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/query/less/with_match.test (+21 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/query/less/with_match.test    2017-01-16 12:41:33 +0900 (a1e9a7d)
@@ -0,0 +1,21 @@
+table_create Memos TABLE_NO_KEY
+column_create Memos content COLUMN_SCALAR ShortText
+column_create Memos created_at COLUMN_SCALAR Time
+
+table_create Terms TABLE_HASH_KEY ShortText \
+  --default_tokenizer TokenBigram \
+  --normalizer NormalizerAuto
+column_create Terms memos_content COLUMN_INDEX|WITH_POSITION Memos content
+
+table_create Times TABLE_PAT_KEY Time
+column_create Times memos_created_at COLUMN_INDEX Memos created_at
+
+load --table Memos
+[
+{"content": "Today is a good day.",         "created_at": "2017-01-16 12:00:00"},
+{"content": "Tomorrow will be a good day.", "created_at": "2017-01-17 12:00:00"}
+]
+
+select Memos \
+  --match_columns 'content' \
+  --query 'tomorrow created_at:<"2017-01-17 13:00:00" day'
-------------- next part --------------
HTML����������������������������...
Download 



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