Description
It looks like it has been fixed in 2.5.5 (https://jira.mongodb.org/browse/SERVER-4572)
However, I'm using 2.6.0-rc2-pre- and the following query fails:
|
|
db.main.find( { $and : [ { "coords": {"$geoWithin": {"$geometry": {"type":"Polygon", "coordinates": [[[-73.650458551013,41.01805351145], |
[-73.699751260364,41.01805351145],
|
[-73.699751260364,40.988362588689],
|
[-73.650458551013,40.988362588689],
|
[-73.650458551013,41.01805351145]]]}}}},
|
{"coords":{"$near":{"$geometry":{"type":"Point","coordinates":[-73.6647,41.000732]}}, "$maxDistance":1609.3470878864}}] }, |
{_id:1}
|
);
|
|
|
error: {
|
"$err" : "Can't canonicalize query: BadValue geo near accepts just one argument when querying for a GeoJSON point. Extra field found: $maxDistance: 1609.3470878864", |
"code" : 17287 |
}
|