PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 4th of May, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[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:07] <thewiz_> http://108.80.8.58:4000/
[17:09:13] <thewiz_> if you login as johndoe:johndoe
[17:09:20] <thewiz_> and type in topics
[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 ?
[17:11:46] <kali> mongosniff would be ideal
[17:11:58] <kali> or the profiler
[17:34:45] <thewiz_> if i apply a limit, it only gives me everything sorted up until that number
[17:35:03] <thewiz_> how can i limit to last 3 instead of first 3?
[17:40:19] <kali> sort in reverse order
[17:42:13] <thewiz_> its not that simple
[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?
[19:17:30] <daidoji> http://docs.mongodb.org/manual/reference/operator/meta/natural/
[19:17:50] <thewiz_> daidoji: cant change sort direction, its important that my posts appear from first to latest from top to bottom
[19:18:19] <daidoji> can't you just print them backwards in the app?
[19:18:39] <thewiz_> how could I do that?
[19:19:39] <daidoji> build an array then for( var i=arr.length; i > -1; i--) { print arr[i]; } etc...??
[19:19:47] <daidoji> I'm a bit confused by that question to be honest
[19:19:51] <thewiz_> i mean
[19:19:54] <thewiz_> i dont print anything
[19:19:58] <thewiz_> it just kind of, spews it out
[19:20:46] <EXetoC> that's not very detailed, but it seems like a limited interface
[19:21:13] <thewiz_> well here is the code, http://pastebin.com/TxtJKkAn
[19:21:36] <daidoji> well spew it out in the opposite order?
[19:21:37] <thewiz_> the user inputs a text command, in this case 'topics' to list all topics
[19:22:24] <thewiz_> everything else on the site goes from top to bottom so I want the topics to also be listed from top to botto
[19:22:25] <thewiz_> m
[19:42:58] <xavtrymongo> Hi. nobody know about documentation mongodb 1.6 ?
[19:46:37] <xavtrymongo> so, I will download the git revert to 1.6 ans try to build a doc....
[20:00:13] <xavtrymongo> ok, I think I found a way to do this in a script in the 1.6 version : replset_remove_node.js
[22:30:35] <SpankyQ> Anyone see anything weird with 2.6.0_1 on osx homebrew?
[22:31:48] <SpankyQ> Running mongo actually runs mongod, I have no mongo client
[22:31:50] <SpankyQ> http://stackoverflow.com/questions/23462202/the-mongo-client-starts-mongod-instead
[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.
[23:02:53] <cheeser> now serving customer 37.
[23:15:17] <fl0w> Is there any obvious downsides to have deep nested documents?
[23:15:37] <fl0w> And in my case it’s 5 levels down
[23:17:31] <cheeser> well, there are downsides to everything ...