Skip to content

Commit

Permalink
test: add reference vector case
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jul 15, 2014
1 parent 7e377dd commit d76883a
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 0 deletions.
@@ -0,0 +1,27 @@
{
"datasets": {
"Default": {
"fact": "Memos",
"schema": {
"Tags": {
"type": "PatriciaTrie",
"keyType": "ShortText"
},
"Memos": {
"type": "Hash",
"keyType": "ShortText",
"columns": {
"content": {
"type": "Scalar",
"valueType": "Text"
},
"tags": {
"type": "Vector",
"valueType": "Tags"
}
}
}
}
}
}
}
@@ -0,0 +1,30 @@
{
"inReplyTo": "request-id",
"statusCode": 200,
"type": "search.result",
"body": {
"memos": {
"attributes": [
{
"name": "_key",
"type": "ShortText",
"vector": false
},
{
"name": "tags",
"type": "Tags",
"vector": true
}
],
"records": [
[
"Droonga is fun",
[
"Droonga",
"Fun"
]
]
]
}
}
}
32 changes: 32 additions & 0 deletions test/command/suite/search/output/attributes/reference_vector.test
@@ -0,0 +1,32 @@
# -*- js -*-
#@require-catalog-version 2
#@disable-logging
{
"type": "add",
"dataset": "Default",
"body": {
"table": "Memos",
"key": "Droonga is fun",
"values": {
"content": "I started Droonga. It is very fun!",
"tags": ["Droonga", "Fun"]
}
}
}
#@enable-logging
{
"type": "search",
"dataset": "Default",
"body": {
"queries": {
"memos": {
"source": "Memos",
"output": {
"elements": ["attributes", "records"],
"attributes": ["_key", "tags"],
"limit": 10
}
}
}
}
}

0 comments on commit d76883a

Please sign in to comment.