-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
docs say 100 is default, but limit fails to override the default.
ruby-1.9.2-p0 > User.near(:latlng => [37.74615865877938,
-122.44619467480469, 0.05]).all.count
=> 100
ruby-1.9.2-p0 > User.near(:latlng => [37.74615865877938,
-122.44619467480469, 0.05]).limit(200).all.count
=> 100
ruby-1.9.2-p0 > User.near(:latlng => [37.74615865877938,
-122.44619467480469, 0.05]).limit(20).all.count
=> 100
http://www.mongodb.org/display/DOCS/Geospatial+Indexing
db.places.find( { loc :
} )
The above query finds the closest points to (50,50) and returns them
sorted by distance (there is no need for an additional sort
parameter). Use limit() to specify a maximum number of points to
return (a default limit of 100 applies if unspecified):
db.places.find( { loc :
} ).limit(20)