Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
1.6.5
-
None
Description
In order to support counting points within a certain distance, $maxDistance should take precedence over the current 100 result limit. To illustrate my own problem, I'd like to count how many crimes happened within a certain range of a particular point. As long as the results are below 100, this query will return the expected result, anything with more than 100 results always returns 100.
db.crimes.count({loc:
{ $near: [-122.578997, 45.533723], $maxDistance: 0.005}, reported_at: {$gte: new Date("Jan 01, 2009"), $lt: new Date("Jan 01, 2010")}