collection.parallel_scan(6)预计将返回6个游标,但仅返回一个游标。 python 3.6,pymongo 3.7.2,mongodb 3.6.3
当我尝试此代码时:
client_mongo = pymongo.MongoClient("xxx",)
db = client_mongo["xxx"]
db.authenticate("xxx", "xxx")
collection = db["xxx"]
pipeline = [{"$match": {"chopito": {"$exists": 1},}}]
doc = collection.aggregate(pipeline)
curs = collection.parallel_scan(6)
print(len(curs))
#return only 1 cursor
我尝试使用此代码来检索我的游标。