I have stored the following document in my Cosmos DB using the Mongo API:
{
"_id" : ObjectId("59157eaabfeb1900011592c8"),
"imageResourceId" : "1489496086018.png",
"gallery" : "Tst",
"thumbnailRaw" : {
"$binary" : "<SNIP>",
"$type" : "00"
},
"tags" : [
"Weapon/Sword",
"Japanese"
],
"__v" : 1
}
I'm trying to perform a query that excludes any objects containing the tag "Japanese". I've crafted the following query, which performs correctly (that is, it does not return the above document) on a real Mongo DB:
{"gallery":"Tst, "tags":{"$nin":["Japanese"]}}
On Cosmos DB, this query returns the above image, despite the presence of a string found in the $nin array. Am I doing this query correctly? Is there another, supported way for Cosmos DB to do a NOT IN logical operation?