$near query operator should validate its arguments

XMLWordPrintableJSON

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

      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 (Inactive)
              Reporter:
              Siyuan Zhou
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: