[SERVER-2945] db.oplog.rs.find().sort({natural: - 1}) gives error Created: 13/Apr/11 Updated: 12/Jul/16 Resolved: 13/Apr/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 1.6.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | MediaMath Mongo | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux 64 bit |
||
| Operating System: | Linux |
| Participants: |
| Description |
|
> db.oplog.rs.find().sort( {natural:-1}) ) |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 13/Apr/11 ] |
|
Yes, should be $natural |
| Comment by Andrew Armstrong [ 13/Apr/11 ] |
|
You may need to use $natural instead of natural (the latter is probably an explicit field name). See http://www.mongodb.org/display/DOCS/Sorting+and+Natural+Order |