[01:02:15] <joannac> oh wait, you need to update. never mind
[01:06:35] <GothAlice> joannac: That'd work of all affected documents had the same length for this array, but they don't. Specifically, modelling a directed acyclic graph, when "detaching" a node from the graph I'd like to pop off the n ancestors identified in the target document from all descendant "ancestors" arrays. I guess I could use a $pullAll… increased transfer costs for that, though.
[01:35:55] <GothAlice> joannac: https://gist.github.com/amcgregor/651b1b106a8f73204ec7f1d8e750c637?ts=4 < what I have so far.
[01:36:39] <GothAlice> coalesce() pulls back in the ancestors arrays and calculates the path field for each, issuing another unordered bulk write. Not entirely happy with the amount of back-and-forth. :/
[01:39:21] <GothAlice> And simplified that down quite a bit. Had some old logging to remove.
[01:48:14] <GothAlice> Updated again to include the coalesce method and remove redundant modification time changes.
[04:45:48] <GothAlice> 7ms to attach a document to the root of the tree from an unattached state. Hmm. That's a bit high.
[05:40:35] <naf> the bolded object is what i'd like to append to the messages array, in this case, rather than setting it to be exactly like that
[05:40:58] <GothAlice> First, almost no-one on IRC will see bold text.
[05:41:16] <GothAlice> Second, $push is what you're looking for. https://docs.mongodb.com/manual/reference/operator/update/push/
[05:42:18] <GothAlice> Third, is that really a creation time? Not a modification time? You can have MongoDB generate that for you, too: https://docs.mongodb.com/manual/reference/operator/update/currentDate/
[05:42:45] <GothAlice> Ah, I see why that's a creation time. ;) Still, MongoDB provides ^ to simplify things a touch.
[05:44:03] <naf> in the case that it is the way i posted it, it's a modification time, since it's updating the entry as it is...unless it's the first time. but with your help, hopefully i can make it a creation time :)
[05:45:19] <GothAlice> In my forums, replies to a thread are stored in the thread, as you are doing here with messages, and I use an ObjectId for each. This lets me update those messages (if people edit their post) by ID, but, as mentioned, also includes the reply creation time in that ID.
[05:46:54] <GothAlice> Very. You can also range query them, i.e. construct "fake" ObjectIds only containing a time, and use $gt / $lt and friends to find records created after or before (respectively) that date.
[05:47:20] <GothAlice> (Only really top-level documents, though. Querying array elements suffers a few limitations.)
[05:47:49] <GothAlice> Also, sorting on these will sort by creation time. (Since the time is first in the ObjectId binary value.)
[06:32:16] <GothAlice> Awww yiss. Am I missing anything for tree manipulation, in that?
[06:32:22] <GothAlice> (Manipulation or traversal.)
[06:40:20] <naf> GothAlice, is there a way i can push an array of objects using $push rather than a single element, without having them remain encased in an array when inserted into the intended document?
[06:41:15] <GothAlice> naf: Could you describe what you mean using example documents for before and what you want the result to be after?
[06:42:01] <GothAlice> https://docs.mongodb.com/manual/reference/operator/update/push/#modifiers < the documentation likely covers what you mean using $each, but I'd like to be sure. ;)
[12:33:46] <Guest69452> can someone please help me how to update mongodb from 2.6 to 3.2 in debian jessie 8
[12:34:04] <Guest69452> i followed the docs but did not work
[12:35:30] <Guest69452> actually there seems quite a few changes from 2.6 to 3.2 i m right now strduck at user creating as the functions such as addUser are deprecated and where as createUser not working in 2.6
[12:36:28] <Guest69452> mongodb documentation provided for wheezy
[12:44:38] <cheeser> you need to step through each version
[14:53:43] <ln-s> Hi, i'm trying to setup mongodb slave, however when i run "mongod --replSet rs0 --port 27017 --dbpath /home/backups/mongo-dev01 -f /etc/mongodb-dev01backup.conf --keyFile /root/key" on a fresh installation i get the following error : F CONTROL [main] Failed global initialization: BadValue: replication.replSet is not allowed when slave is specified
[14:54:40] <GothAlice> ln-s: Master-slave is a deprecated, and _not_ recommended approach.
[14:55:18] <GothAlice> If you have a replica set, omit the slave option from the config. If you actually have master-slave set up, you can't use the replSet options, and I'd recommend migrating to a more modern replica set arrangement.
[14:56:49] <GothAlice> https://docs.mongodb.com/manual/core/master-slave/#convert-master-slave-to-replica-set is a handy tutorial for migrating, if that is your case. :)
[15:24:27] <ln-s> GothAlice: ok, these tutorials worked perfectly for me. In a few words it's : 1) Stop master & slave 2) Start master with --replSet 3) Set db.isMaster() on master 4) start former slave with --replSet 5) extend "master" with rs.add("<slave-ip>"). Thank you.
[15:31:00] <GothAlice> ln-s: It never hurts to help. :)
[15:51:31] <K0ki> looking for help to setup MongoDB on Windows 10
[16:03:43] <K0ki> I told you it's all new to me I just got an IRC acct about 2 wks now
[16:04:12] <Derick> different from my nearly 18 years
[16:04:41] <K0ki> cheeser so the /data/db doesn't have to be under the MongoDB file?
[16:06:27] <K0ki> haha yes! Although I've been around way longer than that not so with IRC or other things. At 67 I am making a stab at setting up my own MC server on Sponge and one of the plugins suggested Mongo. So here I am!!
[16:07:26] <Derick> now you're using words I don't understand (MC and Sponge)
[16:08:34] <cheeser> K0ki: no, it can be wherever you need it to be. mongo just needs to know where to look.
[16:10:10] <K0ki> Minecraft... and Sponge is the new API? to replace bukkit and spigot
[16:10:48] <cheeser> another API?!? i despair of ever teaching my kids how to mod MC...
[16:10:56] <cheeser> K0ki: is there a url for this new stuff?
[16:13:14] <K0ki> It's supposed to be more stable and I guess bukkit and spigot are on the way out because of some legal issues and Sponge is going to be more secure for developers. www.spongepowered.org
[16:18:59] <K0ki> cheeser also #sponge on EsperNet If that's okay to say on freenode
[16:36:57] <K0ki> cheeser YW but another question when I went to the command prompt to enter mkdir data it said there already is a data directory but in searching it doesn't seem to be what I want so I just went to the folder "MongoDB" and put another subfolder under it called data and then another folder under data called db. I feel stupid asking this question but that's the same thing right? It's been a long time since I've played around with
[16:40:19] <K0ki> I guess I just feel intimidated by all you techie guys and gals so it automatically makes me feel like I'm doing something wrong even if I'm not.
[16:41:08] <cheeser> how are you trying to create the directory?
[16:41:57] <K0ki> at the c:\ command prompt I entered mkdir data
[16:42:40] <K0ki> but isn't that the same as putting a folder into windows with the same name?
[17:17:26] <K0ki> Ok now here's another issue which I just thought of. IF my server is on a hosting site.. Shockbyte... is there anyway to use mongodb?