【发布时间】:2016-08-01 09:20:52
【问题描述】:
我的数据库中有一个 json 文档,如下所示:
{
"uri" : "/me/myself/and/bd1e0f91656bfc713eb6560eeaad7ad1.json",
"category" : "content",
"format" : "json",
"versionId" : "14697362595356370",
"contentType" : "application/json",
"contentLength" : "1938",
"collections" : ["http://me.myself.com/collectionA"],
"properties" : {
"relatives" : ["/me/myself/and/B.json", "/me/myself/and/A.json"]
},
"content":{}
}
我正在尝试获取在属性中具有特定关系的所有文档:
qb.where(
qb.scope(
qb.property('relatives'),
qb.word("/me/myself/and/B.json"),
qb.fragmentScope('properties')
))
但我不断收到大量不适合查询的文档。
知道如何使用 Marklogic NodeJS API 做到这一点吗?
【问题讨论】: