Hi--
I've got this bit of code:
val query = MongoDBObject("location" -> MongoDBObject("$near" -> (zipcode.longitude, zipcode.latitude)))
val cursor = stuff.find(query).limit(200)
println("CURSOR COUNT = " + cursor.count)
The result of the print is always "100" even though I have millions of objects in that collection.
The docs say: "Use limit() to specify a maximum number of points to return (a default limit of 100 applies if unspecified)."
Interestingly, if I use "10" for the limit in the above query, the println still emits "100".
Same thing when using the mongo cli:
> var c = db.stuff.find({location: { $near : [-89, 45]}})
> c.count()
100
> var c = db.stuff.find({location: { $near : [-89, 45]}}).limit(200)
> c.count()
100
> var c = db.stuff.find({location: { $near : [-89, 45]}}).limit(20)
> c.count()
100
Is there a bug in here somewhere? (1.8.x)
HOWEVER, when I process the results of the query with .limit(200), I actually get 200 objects.
Keith