MongoDB.live, free & fully virtual. June 9th - 10th. Register Now MongoDB.live, free & fully virtual. June 9th - 10th. Register Now

AtlasError when using $or: Insight on why is limited/unsupported

Hello,

I’ve read both https://docs.atlas.mongodb.com/reference/unsupported-commands/ and https://docs.atlas.mongodb.com/reference/free-shared-limitations/ as well as https://docs.mongodb.com/manual/reference/operator/aggregation/or/index.html and https://docs.mongodb.com/manual/reference/operator/query/or/index.html but I cannot understand why I’m given AtlasError below when there’s nowhere to be found that $or is limited/unsupported.

{
    "ok": 0,
    "errmsg": "$or is not allowed in this atlas tier",
    "code": 8000,
    "codeName": "AtlasError",
    "name": "MongoError"
}

Can anyone give me some insight as to why is that, when documentation doesn’t state that the operator is limited/unsupported?

Thank you

You do not provide enough context to understand your issue. What command or action were you doing when you got this error.

Inside an aggregate, one of the steps I added was $match with an $or inside.

Hi Raphael,

Can you provide an example of the aggregation pipeline you are executing and confirm the Atlas tier you are using?

Thanks,
Stennie

I first tried with:

coll.find({$or: [{_id: _id},{id: _id }]})

And I got the error. Then I tried on aggregate

			coll.aggregate([
				{
					$match: {
						$or: [{ _id: _id }, { id: _id }, { name: _id }],
					},
				},

And I got same error as well.

But oddly enough, I ran today again the aggregate just to make sure before replying and did not give me the error I posted on the first post, instead, it worked.
I’m using M0 Free Plan.

Maybe it had an issue on my end, I don’t know. O.o