[Groonga-commit] droonga/droonga-engine at 29306a4 [master] test: use catalog.json to define schema

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Apr 30 15:49:39 JST 2014


Kouhei Sutou	2014-04-30 15:49:39 +0900 (Wed, 30 Apr 2014)

  New Revision: 29306a4981d860e2f41abe96253fa073028baa55
  https://github.com/droonga/droonga-engine/commit/29306a4981d860e2f41abe96253fa073028baa55

  Message:
    test: use catalog.json to define schema
    
    Groonga can't detect index source change without restart a process
    that already opens a Groonga database.
    
    In Droonga, worker processes opens their database and server process
    defines tables and columns in the database by table_create and
    column_create. So worker processes can't detect index source change by
    server process. If we use catalog.json to define tables and columns,
    server process defines them and then worker processes run and open the
    database. So worker processes can know the latest index source.
    
    We need more work about them. There are some tests that face the case.
    See test results on Travis CI.

  Added files:
    test/command/suite/search/multiple/chained.catalog.json
  Modified files:
    test/command/suite/search/multiple/chained.test

  Added: test/command/suite/search/multiple/chained.catalog.json (+37 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/search/multiple/chained.catalog.json    2014-04-30 15:49:39 +0900 (6f66348)
@@ -0,0 +1,37 @@
+{
+  "datasets": {
+    "Droonga": {
+      "schema": {
+        "Sections": {
+          "type": "Hash",
+          "keyType": "ShortText",
+          "columns": {
+            "title": {
+              "type": "Scalar",
+              "valueType": "ShortText"
+            }
+          }
+        },
+        "Terms": {
+          "type": "PatriciaTrie",
+          "keyType": "ShortText",
+          "normalizer": "NormalizerAuto",
+          "tokenizer": "TokenBigram",
+          "columns": {
+            "title_index": {
+              "type": "Index",
+              "valueType": "Sections",
+              "indexOptions": {
+                "sources": [
+                  "title"
+                ],
+                "position": true
+              }
+            }
+          }
+        }
+      },
+      "fact": "Sections"
+    }
+  }
+}

  Modified: test/command/suite/search/multiple/chained.test (+102 -1)
===================================================================
--- test/command/suite/search/multiple/chained.test    2014-04-29 00:53:36 +0900 (88e3d50)
+++ test/command/suite/search/multiple/chained.test    2014-04-30 15:49:39 +0900 (8a7f294)
@@ -1,4 +1,105 @@
-#@include fixture/documents.jsons
+#@require-catalog-version 2
+#@disable-logging
+{
+  "dataset": "Droonga",
+  "type": "add",
+  "body": {
+    "table": "Sections",
+    "key": "1.1",
+    "values": {
+      "title": "Groonga overview"
+    }
+  }
+}
+{
+  "dataset": "Droonga",
+  "type": "add",
+  "body": {
+    "table": "Sections",
+    "key": "1.2",
+    "values": {
+      "title": "Full text search and Instant update"
+    }
+  }
+}
+{
+  "dataset": "Droonga",
+  "type": "add",
+  "body": {
+    "table": "Sections",
+    "key": "1.3",
+    "values": {
+      "title": "Column store and aggregate query"
+    }
+  }
+}
+{
+  "dataset": "Droonga",
+  "type": "add",
+  "body": {
+    "table": "Sections",
+    "key": "1.4",
+    "values": {
+      "title": "Inverted index and tokenizer"
+    }
+  }
+}
+{
+  "dataset": "Droonga",
+  "type": "add",
+  "body": {
+    "table": "Sections",
+    "key": "1.5",
+    "values": {
+      "title": "Sharable storage and read lock-free"
+    }
+  }
+}
+{
+  "dataset": "Droonga",
+  "type": "add",
+  "body": {
+    "table": "Sections",
+    "key": "1.6",
+    "values": {
+      "title": "Geo-location (latitude and longitude) search"
+    }
+  }
+}
+{
+  "dataset": "Droonga",
+  "type": "add",
+  "body": {
+    "table": "Sections",
+    "key": "1.7",
+    "values": {
+      "title": "Groonga library"
+    }
+  }
+}
+{
+  "dataset": "Droonga",
+  "type": "add",
+  "body": {
+    "table": "Sections",
+    "key": "1.8",
+    "values": {
+      "title": "Groonga server"
+    }
+  }
+}
+{
+  "dataset": "Droonga",
+  "type": "add",
+  "body": {
+    "table": "Sections",
+    "key": "1.9",
+    "values": {
+      "title": "Groonga storage engine"
+    }
+  }
+}
+#@enable-logging
 {
   "type": "search",
   "dataset": "Droonga",
-------------- next part --------------
HTML����������������������������...
Download 



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