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

Order of parameters in hash triggers weird error message

    • Linux

      This is my actual Mongo shell output. As you can see, reverting the order of the elements inside the location hash triggers an error. Is this by design?

      > db.cached_editions.find({ location: { $near: [ 52.0530174, 5.15622415 ], $maxDistance: 0.092 }}).limit(1)

      { "_id" : ObjectId("4f0f123138eb1ae64490bb9c"), "city" :

      { "name" : "Bunnik", "slug" : "bunnik", "id" : 1419327813 }

      , "price" : 2000, "edition_slug" : "knuffelbaar-festival", "highlight_agenda" : false, "location" : [ 52.0554, 5.15762 ], "tickets_count" : 0, "country" :

      { "name" : "The Netherlands", "slug" : "nederland" }

      , "edition_name" : "Knuffelbaar Festival", "published" : true, "starts_at" : 1310036400, "updated_at" : 1309270978, "maybe_count" : 0, "date" : 1310036400, "id" : ObjectId("4f0f123121bcd631c900869d"), "sure_count" : 0, "edition_id" : 98450, "ends_at" : 1310070600, "highlight_homepage" : false, "comments_count" : 0, "venue" :

      { "name" : "Fort bij de Vechten", "slug" : "fort-bij-de-vechten" }

      , "genres" : [ "club-house", "dubstep", "house", "minimal", "tech-house", "techno" ], "flyers" : [

      { "app_thumbnail" : "/a/flyers/qq/05/mu/47/bottom_cropped_100x100.jpg", "app_fullscreen" : "/a/flyers/qq/05/mu/47/fit_rotate_640x920.jpg", "homepage" : "/a/flyers/qq/05/mu/47/cropped_to_202x130.jpg" }

      ] }

      > db.cached_editions.find({ location: { $maxDistance: 0.092, $near: [ 52.0530174, 5.15622415 ] }}).limit(1)

      error: {
      "$err" : "geo values have to be numbers:

      { $maxDistance: 0.092, $near: [ 52.0530174, 5.15622415 ] }

      ",
      "code" : 13026
      }

      Thanks for any feedback!

      Bruno Antunes

            Assignee:
            Unassigned Unassigned
            Reporter:
            bruno Bruno Antunes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: