【发布时间】:2019-06-06 16:47:51
【问题描述】:
如何让这个查询也能在 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
问题是,我们正在迁移以使用 documentdb,而 documentDB 默认运行 mongo 3.6。
我一直收到此错误,我认为这是版本问题。
pymongo.errors.OperationFailure: $in array size must not be greater than 10000
【问题讨论】:
标签: python arrays mongodb pymongo aws-documentdb