GeoWithinBox doesn't contain enough parameters

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.0
    • Affects Version/s: 2.0
    • Component/s: API
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      FieldDefinitionBuilder.GeoWithinBox methods have only 2 parameters for bounding box coordinates - x and y. It is impossible to add second corner coordinates.

      Calling method creates query like this:

      Bad query
      "$query" : {
              "Location" : {
                      "$geoWithin" : {
                              "$box" : [
                                      16.9,
                                      52.38
                              ]
                      }
              }
      }
      

      It results in throwing an exception by mongod:

      "exception" : "Can't canonicalize query: BadValue bad geo query: { $geoWithin: { $box: [ 16.9, 52.38 ] } }",
      "exceptionCode" : 17287,
      

      According to DB documentation, $box should contain two pairs of coordinates, eg.

      { $box:  [ [ 0, 0 ], [ 100, 100 ] ] }
      

              Assignee:
              Unassigned
              Reporter:
              Kamil Cie?lak [X]
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: