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
  • Loading branch information
kou committed Apr 30, 2014
1 parent dcac0eb commit 82c4d51
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/condition/script.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/condition/script.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 82c4d51

Please sign in to comment.