Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-22206

$near query operator should validate its arguments

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Geo, Querying
    • Fully Compatible
    • ALL
    • Query F (02/01/16), Query 10 (02/22/16)

      Invalid arguments are ignored silently. MongoDB should error out for invalid arguments, e.g. "maxDistance" instead of "$maxDistance".

      {
      	"loc" : {
      		"$near" : {
      			"$geometry" : {
      				"coordinates" : [
      					-77.446044,
      					43.227321
      				],
      				"type" : "Point"
      			},
      			"maxDistance" : 0.0002525890376357666,
      			"count" : 1
      		}
      	}
      }
      

            Assignee:
            benjamin.murphy Benjamin Murphy
            Reporter:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: