When I query my MongoDB server with a filter using $all and an empty array I don't get any results.
I am using pymongo and when my query looks like this:
my_collection.find({"some_field": some_value, "array_field": {"$all": []}})
I don't get any result. If I change it to this:
my_collection.find({"some_field": some_value})
I do get the results I want.
Is this behavior as should be (and I should not send an $all filter if the array is empty)?
My reference is https://docs.mongodb.com/manual/reference/operator/query/all/
Thanks a lot.