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

$near query operator should validate its arguments

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Geo, Querying
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Query F (02/01/16), Query 10 (02/22/16)

      Description

      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
      		}
      	}
      }
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: