mongodb - Pymongo cursor returns incomplete results -
i have 2 following scenarios using pymongo:
cursor = db.col.find({'_id':{'$in':list_of_ids}})
returns 87 records, while list_of_ids 335 in length.
stuff = [] item in list_of_ids: stuff.append(list(db.col.find({'_id':item})
returns of 335. don't want hit db 335 times, need records. couldn't find in documentation. exhaust cursor seems nice couldn't figure how set it. next() method iterates 1 one. list(cursor) still returns 87.
does have suggestions?
Comments
Post a Comment