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

)
> db.oplog.$main.find().sort(

{natural:-1}

)
error: {
"$err" : "too much data for sort() with no index. add an index or specify a smaller limit",
"code" : 10128
}
> db.oplog.$main.find()



 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

Generated at Thu Feb 08 03:01:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.