Hello,
We use Couchbase to store RDF documents in JSON-LD format, expanded to prevent context duplication in stored documents. The problem is that N1QL returns incorrect results when quering fields containing forward-slash. Say, I have a doc in bucket “rdf”, which looks like following:
{
“@id” : “http://wonderland#whiterabbit”,
“http://wonderland#Color” : “White”
}
If I try to query docs by
SELECT * FROM `rdf` WHERE `@id`=“http://wonderland#whiterabbit”,
I get this doc without any problems, but if I execute a query
SELECT * FROM `rdf` WHERE `http://wonderland#Color\` IS NOT MISSING,
I get an empty result set like
{
“requestID”: “6cfa3436-59c6-4f32-acec-8a9243246160”,
“signature”: {
“": "”
},
“results”: [
],
“status”: “success”,
“metrics”: {
“elapsedTime”: “14.01ms”,
“executionTime”: “14.01ms”,
“resultCount”: 0,
“resultSize”: 0
}
}.
Through some experiments with cbq shell I determined that similar situations take place only when there is one or more forward-slashes in JSON property names.
I am using CB Server 4.0.0-4051 Community Edition (build-4051).
So, my question is: is there something I did wrong all about it, or it’s just a N1QL character escaping bug?