On Wed, Aug 18, 2010 at 10:18 AM, ZedroS <zedros....@gmail.com> wrote:
> hi
>
> I've been struggling which a DBCursor not returning all the results.
>
> It happens as well when using the way described in mongodb java
> documentation Using a Cursor to Get All the Documents (http://
> www.mongodb.org/display/DOCS/Java+Tutorial?focusedCommentId=4161628#JavaTutorial-UsingaCursortoGetAlltheDocuments)
> .
>
> Strangely enough, I always get 101 results, which is the number put
> out in this tutorial, whereas I've 195 documents.
>
> When looking closer, using the iterator from a DBCursor, it looks like
> it triggers the first query and then use the number of result of it
> for ever afterwards. In my case, it means 101 results:
> { "ts" : "Wed Aug 18 2010 15:24:54 GMT+0200 (CEST)", "info" : "query
> ion-cf.City reslen:42798 nscanned:101 \nquery: {} nreturned:101
> bytes:42782 0ms", "millis" : 0 }
>
> A count query returns 195 and setting a "high" limit on the query
> backing the DBCursor does the trick as well:
> { "ts" : "Wed Aug 18 2010 16:16:37 GMT+0200 (CEST)", "info" : "query
> ion-cf.City ntoreturn:300 reslen:82516 nscanned:195 \nquery: {}
> nreturned:195 bytes:82500 0ms", "millis" : 0 }
>
> is it a bug or a feature ?
>
> read ya
> zedros
>
> --
> 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.
>
>
--
--
If you can provide a full example that breaks would be great.
May also want to try java 2.1 driver (coming out shortly)
--
Are you sure this has never happened anywhere else?
Please test a bit more on non openvz systems.