I had assumed batchSize was the number of objects downloaded from the
server in a single batch (to avoid tons of synchronous requests). But
it seems to also set the 'limit' param.
the code in question (java):
cur.batchSize(500);
cur.limit(1000);
while(cur.hasNext()) {
DBObject obj = cur.next()
//do something
}
In this example I only get 500 results back. Easy enough fix is to
set batchSize = limit. I'm just confused as to the logic.
There is in fact a unit test exactly for that
http://github.com/mongodb/mongo-java-driver/blob/master/src/test/com/mongodb/DBCursorTest.java#L153-162
If you can provide a full example that fails, can take a look.
> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>