[00:43:55] <in_deep_thought> how can I paginate through a randomly returned array? I have heard that paginate can be done with .skip and .limit with few items. I only have 50 items but what I want is for those 50 to be returned randomly each time and then paginated through. I have this so far: http://bpaste.net/show/A4eCOiBzDDPsVjaMFyIK/ but it gets the error at the bottom. How can I do this?
[05:58:30] <frodo_baggins> Why can't .find() or other functions that accept a query accept a string representation of an ID?
[05:58:49] <frodo_baggins> Why does it have to be BSON.ObjectID(aStringID) (in node.js)
[08:47:43] <shesek> I have documents that looks something like that: `{ name: 'foo', bars: [ { name: 'qux', somefield: 1 } ] }` with a unique index on `bars.name`. I want to either update the sub-document where `{ name: 'foo', 'bars.name': 'qux' }` and `$set: { 'bars.$.somefield': 2 }`, or create a new sub document with `{ name: 'qux', somefield: 2 }`
[08:47:55] <shesek> Is that possible somehow with upsert, or will I have to issue two queries?
[14:46:33] <OliverJAsh> i'm performing a query using the $lte operand on an object ID. i am expecting a document to be returned because it has an object ID with a timestamp that is less than or equivalent to the timestamp of the object ID i am querying with. however, i get nothing.
[14:46:48] <OliverJAsh> are my expectations incorrect? is $lte on ObjectId not using the timestamp?
[15:36:50] <kali> OliverJAsh: nope it should work. show us what you're doing if you're still stuck
[16:58:32] <thewiz_> Can somebody help me? I have a system where a user inputs a command and returns a list of topics, sorted by most recent. I want to sort by most recent unviewed topics and have it only show the latest 10 recent unseen topics, this is the code I am using right now http://pastebin.com/yPmS6hq4
[16:59:09] <thewiz_> whoops wrong, pastebin hold on
[17:00:02] <thewiz_> this is the code im using http://pastebin.com/Ais4KUbj
[17:06:09] <kali> well, that's quite a bit of code... what's wrong ?
[17:08:11] <thewiz_> It returns most recent topics, but does not put unviewed topics first
[17:09:54] <thewiz_> you can see that the third topic that has already been viewed is still the most bottomest one, and I want only unviewed topics to be the most bottomest ones
[17:11:22] <kali> can you "see" the full definition of the query you're actually sending to the server ?
[18:41:05] <thewiz_> How can I combine .sort({$natural: -1}).limit(5); and shell.db.Topic.find({}); ?
[18:41:36] <xavtrymongo> Hello. I have to migrate some very old version of mongo (1.6) . I didn't found the way to remove a member for this version ? Someone know about this ?
[18:42:20] <xavtrymongo> Someone know where is the 1.6 documentation archive ?
[19:15:20] <thewiz_> how can i limit my query to last 8 ?
[19:16:09] <thewiz_> i have something like query = query.skip(0).sort({$natural:1}).limit(6) but that only shows 0 to 5 cutting off all the rest
[19:16:18] <thewiz_> i just want the last 6, not the first 6
[19:17:04] <daidoji> thewiz_: sort the other direction then limit?
[23:02:22] <SpankyQ> You know, as many times as I've joined IRC channels for some sort of support thing like this, I've never gotten a single response.