Create one document using Java API:
JsonStringDocument.create(key, objectWriter.writeValueAsString(destinationToken));
Upsert:
Observable.from(list).flatMap(aclBucket::upsert).last().timeout(3, SECONDS).toBlocking().single();
where list
is a list of JsonStringDocument
created as above.
Query:
curl -v -u "xxx:yyy" http://localhost:8093/query/service -d 'statement=SELECT * FROM
my-bucketUSE KEYS ["key"]'
"results": [
{
"key: "\u003cbinary (197 b)\u003e"
}
]
Why’s the document returned as binary in spite of being stored as JsonStringDocument
? Shouldn’t I get the JSON string back? The same thing happens from admin console. When I click on the document, it gives an error “Warning: Editing of binary document is not allowed”.