News for hackers. Stuff that matters.
Re:MongoDB interactive tutorial by tomkr on Wednesday March 16, 2011 @04:57AM (#2331341)
Awesome tutorial. It's always fun to mess around with things like this. I am running into a problem with sorting though. On lesson 6 I am sorting with {weight:1} which the tutorial says is wrong, but I get the same answer as sorting on {weight: -1} which is correct according to the tutorial. Or is this a mongodb thing? Anyway, keep up the good work.
Re:MongoDB interactive tutorial by latch on Wednesday March 16, 2011 @08:21AM (#2331707)
weight:-1 is correct..since you want the heaviest, you sort by weight descending. weight:1 should have returned documents in ascending order but wasn't working. It's fixed now on the tutorial..as well as in the core web console: https://github.com/karlseguin/Mongo-Web-Admin/commit/761cd4e...