Navigation Menu

Skip to content

Commit

Permalink
test: use catalog.json to define schema
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kou committed Apr 30, 2014
1 parent 10709a8 commit 29306a4
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 1 deletion.
37 changes: 37 additions & 0 deletions test/command/suite/search/multiple/chained.catalog.json
@@ -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"
}
}
}
103 changes: 102 additions & 1 deletion test/command/suite/search/multiple/chained.test
@@ -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",
Expand Down

0 comments on commit 29306a4

Please sign in to comment.