I\'m migrating my app from Mongoose 2.6.5 to 3.1.2, and I\'m running into some unexpected behavior. Namely I notice that query results are automatically being limited to 100
You're getting tripped up by a pair of related factors:
So your options are to put a combo index on TestDataPoint
that would allow mongo to use it for sorting by dataPoint
in this type of query or increase the batch size to at least the total count of documents you're expecting.
Wow that's awful. I'll publish a fix to mongoose soon removing the batchSize default (was helpful when streaming large result sets). Thanks for the pointer.
UPDATE: 3.2.1 and 2.9.1 have been released with the fix (removed batchSize default).