[SERVER-4696] Order of parameters in hash triggers weird error message Created: 17/Jan/12 Updated: 29/Feb/12 Resolved: 18/Jan/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 2.0.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Bruno Antunes | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | commands | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 8.04.4 LTS, using the 10gen repository's (http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen) v2.0.2 package on an 8-core server with 16GB of RAM. |
||
| Operating System: | Linux |
| Participants: |
| Description |
|
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: { ", Thanks for any feedback! Bruno Antunes |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 18/Jan/12 ] |
|
This is as intended. BSON is naturally ordered. |