[SERVER-18993] geoNear aggregate operator ignores minDistance Created: 16/Jun/15  Updated: 18/Jun/15  Resolved: 16/Jun/15

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Geo
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Kevin Albertson Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-14421 Support minDistance for $geoNear aggr... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

db.minbug.insert({ loc : { type : "Point", coordinates: [0,0] } })
db.minbug.insert({ loc : { type : "Point", coordinates: [0,.001] } })
db.minbug.createIndex({ loc : "2dsphere" })
db.minbug.aggregate([{
		$geoNear: {
			minDistance: 10,
			maxDistance: 100,
			spherical: true,
			distanceField: "distance",
			near: {"type": "Point", "coordinates": [0,0]}
		}
	}]);

Regardless of supplied minDistance, it will always at least return [0,0].

Participants:

 Description   

The geoNear aggregate operator ignores the supplied minDistance. The minDistance option is not documented (http://docs.mongodb.org/manual/reference/operator/aggregation/geoNear/) but I don't see a reason why it isn't included. It isn't mentioned under the exceptions from the ordinary geoNear command.



 Comments   
Comment by Kevin Albertson [ 16/Jun/15 ]

Realized that this is a duplicate of SERVER-14421, closing.

Generated at Thu Feb 08 03:49:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.