Hello @Vigneshwaran_Rengana to add the fully qualified namespace you are correct use the qualifier like you have mentioned, if your keyspace has special characters than escape the name using the ticks
for instance
const query = new Query({}, 'bucketName.scopeName.collectionName');
const where_exp = {
$any: {
$expr: [{ b: { $in: ‘block2’ } }],
$satisfies: { ‘b.field3’: {$eq: “xyz”} },
}
};
this will produce this valid N1Ql query
SELECT * FROM travel-sample.inventory.hotel WHERE ANY b IN block2 SATISFIES b.field3=“xyz” END
const result = await this.validateOneByEmail (filter);
}
`
Iam trying something like this but not getting any response, can you please helpon that.
Thanks
Vignesh
CREATE INDEX ix1 ON mybucket.myscope.mycollection ( DISTINCT ARRAY e FOR e IN emails END);
SELECT *
FROM mybucket.myscope.mycollection AS c
WHERE ANY e IN emails SATISFIES e = "xyz@abc.com" END;
Query builder syntax some thing in this lines
const where_exp = {
$any: {
$expr: [{ e: { $in: emails } }],
$satisfies: { e: {$eq: “xyz@abc.com”} },
}
};
Thanks. I missed that e, I think there is need for updates in ottoman documentation, which covers all aspectes of couchbase capabilities. thanks for the quick help. this where exp works on my index validateOneByEmail.