I use marklogic 9 with Node.js Client Api. when I try to use queryBuilder to search my doc, I find some problem.
this is my doc data
company: {
uuid : uuid,
name : comapnyName,
parentCompany: {
uuid: uuid,
name: parentCompanyName,
}
}
I want to find all the company below the parent company but not include parent company. I use
db.documents.query(
this.qb.where(
this.qb.directory('/company/'),
this.qb.collection('company'),
this.qb.word('name',parentCompanyName),
)
).result();
this query find all the company include parent company.
I think it find company.name and company.parentCompany.name.
How can I use BuilderQuery to find doc with company.parentCompany.name?