Link to home
Start Free TrialLog in
Avatar of wsyy
wsyy

asked on

MongoDB question

When I want to sort by multiple keys on mongodb , I got some problem , And can I fix it ??

db.test.a.count()

78150

db.test.a.ensureIndex({a:1,b:1,c:1,d:1});

db.test.a.find().sort({a:1,b:1,c:1,d:1});

error: { "$err" : "too much data for sort() with no index. add an index or speci fy a smaller limit", "code" : 10128 }
Avatar of tbsgadi
tbsgadi
Flag of Israel image

Avatar of wsyy
wsyy

ASKER

Hi Gary, sorry for late response. Quite busy recently.

Could you please check the link? Can't access to it.
ASKER CERTIFIED SOLUTION
Avatar of tbsgadi
tbsgadi
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial