tmp_mongo$find('{"name": {"$type": "array"}}')
"Missing` "$binary" after "$type" reading type "binary""
when tried to select documents by type of field from collection with find or aggregation (tmp_mongo$aggregate('[{"$match": {"name": {"$type": "Array"}}}]) queries. The error stays same with any BSON type from MongoDB manual , replacing alias to integer form give another error:
tmp_mongo$find('{"name": {"$type": 4}}')
Error: Unexpected integer 4 in type "binary"
Couldn't find anything about using $type in mongolite, suppose some error with recognizing of this operator syntax. Same queries in mongosh works fine:
Got error:
when tried to select documents by type of field from collection with find or aggregation (
tmp_mongo$aggregate('[{"$match": {"name": {"$type": "Array"}}}]
) queries. The error stays same with any BSON type from MongoDB manual , replacing alias to integer form give another error:Couldn't find anything about using $type in mongolite, suppose some error with recognizing of this operator syntax. Same queries in mongosh works fine:
MongoDB 5.0.8 Community, mongolite version 2.7.1