How to make this query also work in 3.6 mongodb?
def get_metadata(self, job_id_list):
# Gets all the document attributes except for `xml` and `_id` field
resultList = list(self.collection.find({'jobId': {"$in": job_id_list}}, {'xml': 0, '_id': 0}))
return resultList
The thing is that, we're migrating to use documentdb and documentDB by defaults runs mongo 3.6.
I've been getting this error and I think it's a version thing.
pymongo.errors.OperationFailure: $in array size must not be greater than 10000