[Groonga-commit] groonga/groonga at f88444b [master] test: add a test for "AND optimization"

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Jan 16 11:55:04 JST 2017


Kouhei Sutou	2017-01-16 11:55:04 +0900 (Mon, 16 Jan 2017)

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

  Message:
    test: add a test for "AND optimization"

  Added files:
    test/command/suite/select/query/logical_operator/or_and_and.expected
    test/command/suite/select/query/logical_operator/or_and_and.test

  Added: test/command/suite/select/query/logical_operator/or_and_and.expected (+47 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/query/logical_operator/or_and_and.expected    2017-01-16 11:55:04 +0900 (77374fb)
@@ -0,0 +1,47 @@
+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]
+table_create Terms TABLE_HASH_KEY ShortText   --default_tokenizer TokenBigram   --normalizer NormalizerAuto
+[[0,0.0,0.0],true]
+column_create Terms index COLUMN_INDEX|WITH_POSITION Memos content
+[[0,0.0,0.0],true]
+load --table Memos
+[
+{"content": "Today is a good day."},
+{"content": "Tomorrow will be a good day."}
+]
+[[0,0.0,0.0],2]
+select Memos   --match_columns 'content'   --query '(today OR tomorrow) day'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        2
+      ],
+      [
+        [
+          "_id",
+          "UInt32"
+        ],
+        [
+          "content",
+          "ShortText"
+        ]
+      ],
+      [
+        1,
+        "Today is a good day."
+      ],
+      [
+        2,
+        "Tomorrow will be a good day."
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/query/logical_operator/or_and_and.test (+17 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/query/logical_operator/or_and_and.test    2017-01-16 11:55:04 +0900 (0449eba)
@@ -0,0 +1,17 @@
+table_create Memos TABLE_NO_KEY
+column_create Memos content COLUMN_SCALAR ShortText
+
+table_create Terms TABLE_HASH_KEY ShortText \
+  --default_tokenizer TokenBigram \
+  --normalizer NormalizerAuto
+column_create Terms index COLUMN_INDEX|WITH_POSITION Memos content
+
+load --table Memos
+[
+{"content": "Today is a good day."},
+{"content": "Tomorrow will be a good day."}
+]
+
+select Memos \
+  --match_columns 'content' \
+  --query 'today OR tomorrow day'
-------------- next part --------------
HTML����������������������������...
Download 



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