[00:01:14] <VooDooNOFX> proteneer: Of course, you'd likely be better off sharding that much data over several servers, and allow each to retrieve local data it's responsible for.
[00:02:19] <VooDooNOFX> proteneer: rather than try and store it on a zfs or gpfs volume and just having a single server hit that storage.
[01:28:42] <Richhh> any difference between collection.find().toArray(function( ... and collection.find({}, function(err, res) { res.toArray(function(... ?
[01:50:11] <sinelaw> hi! I'm using a text index and it's quite slow. how can I make it faster?
[01:51:09] <sinelaw> getting the first 100 results is fast, but specifically I'm trying to find the number of matching docs, so i have to set a very large limit
[02:26:45] <groundup> I wish Mongo had the ability to add constraints to documents. It would only be an insert/update thing. I know this is something to do in the app and documents are schemaless. Still something that would make it better.
[05:53:53] <greybrd> while creating a replica set with two members, both the nodes are in primary even after adding using rs.add() from primary. what am I doing wrong. please gimme some pointers to solve the issue.
[06:36:19] <joannac> um, that shouldn't be possible
[06:36:27] <joannac> can you pastebin a rs.status()?
[08:42:42] <samurai2> greybrd : copy db doesn't need you to block other operation while you do it
[08:43:03] <samurai2> clone will need to do write lock to the database you want to replicate
[08:43:49] <greybrd> samurai2: thanks.. that something I don't know. write lock is not a problem. but how frequently running this command is a question mark.
[08:44:07] <Nodex> I think he means property replication no?
[08:44:19] <greybrd> where as in replicate, I don't have to bother.
[08:44:28] <samurai2> o then you need a replica set right?
[08:44:41] <greybrd> Nodex: no. it's just a normal replication. except, not all databases. only that I specify. like in mysql.
[08:44:53] <greybrd> samurai2: I'm already using replica set.
[08:45:04] <samurai2> o so then why you need to copy it again?
[08:45:06] <Nodex> greybrd : yes that's what I said
[08:46:03] <greybrd> my problem here is. I'm collecting syslog events into a database, with a ttl of 1 hours. I'm mapreducing the events to a condensed format in other database with in a single instance. now I want to replicate the condensed database. not a raw one.
[08:46:22] <greybrd> because it will have an insert rate of a few hundreds per second.
[08:47:29] <greybrd> Nodex: how will that solve my problem. anyway, thanks for the tip. I'll look into it now
[08:47:47] <samurai2> so then just copy the database where you put the result of your map/reduce :)
[08:50:34] <Nodex> greybrd : you wanted to replicate a SINGLE database. That is what a tailable cursor will allow you to do
[08:54:38] <greybrd> samurai2: I'll look into the db.copy(). I think that would be simple. but need to analyze the complications in a production environment when compared to replication.
[08:55:20] <greybrd> Nodex: thanks... I'm writing a sample in java for a tailable cursor now. will get back to your guys on that.. soon..
[08:55:26] <greybrd> samurai2: thanks a lot buddy. .
[08:55:55] <samurai2> greybrd : your welcome. good luck :)
[09:54:28] <rspijker> I have a question about authentication on a sharded cluster. I want to connect to a single shard server (mongod), but authentication fails on it, no matter what. Authentication with the same credentials works fine on the mongos instance. I believe the mongod has it's own admin db and, therefore, it's own set of users. Is there any way for me to auth to the mongod?
[10:07:31] <jordig> Hello, I'm using MongoDB aggregation to get some data from a database, on the $project phase, I'm struggling to get the document _id as a normal string (What I do get is a MongoId Object as default). I'm using php and I'm creating sort of a simple JSON API.
[11:20:11] <phrearch> i did a mongoexport of a collection, and was expecting it to be valid json, but it doesnt seem to be the case when i run it through JSON.parse
[11:35:47] <rspijker> phrearch: yeah, if you use the default it will create separate lines for separate documents, no wrapping around it. With --jsonArray it puts them all in an array and separates them with commas
[11:36:17] <phrearch> rspijker: jsonArray works fine. thanks for the tip
[13:17:25] <_boot> what db does a shard config server actually use for shard config data?
[13:24:10] <mylord> Nodex, thx.. how can i write that from node? ie, collection.findAndModify({"query":{"dId":"dId_1"}, {"update":{"$set":{"balance":5}}}, "upsert":true, "new":true});
[13:39:40] <mylord> Nodex, this works from mongo shell: db.users.findAndModify({query:{dId:"test_1"}, update:{"$set":{balance:5}}, upsert:true, new:true})
[13:40:02] <mylord> I read that now you need to explicitly write update.. or did i misinterpret?
[13:40:54] <mylord> your line didn’t work for me; same prob: “need update or remove"
[13:41:09] <mylord> i’m now struggling to get my working line to work from node
[13:42:27] <Nodex> then I doubt you're using the node native driver
[15:51:37] <lagweezle> I'm hoping someone here might be able to help with my attempts at using mongokit. I'm trying to use inheritance and referring to the specific type of OAuth item as an attribute of the User class. I'm having a great deal of issue getting the OR bit to work as I'd expect. I've got https://gist.github.com/ncolton/9956763 to show what I'm attempting to do...
[15:51:47] <lagweezle> Well, and the errors I'm getting.
[15:51:52] <mylord> Nodex: how about this one: http://hastebin.com/tukusaroso.coffee
[15:52:07] <mylord> how comes the mongo shell works at bottom, but line 10 via node doesn’t work?
[15:54:21] <jackal_af> Anyone aware of a tool to help with data model development for Mongo?
[15:54:38] <mylord> Nodex: got it, was missing the toArray: collection.find(arg0, {safe:true}).toArray(function(err, result) {
[16:01:38] <mylord> Nodex, but its only returning the _id, not the entire document.. any ideas?
[16:04:03] <mylord> removing {safe:true} fixed that
[16:29:58] <richthegeek> I'm considering using Geo indexes for a game (2d procedural terrain + object/character position)... are there any limits of the lat/lng values? Like can I use integers for each sqaure (~2m*2m) and it will still work fine if the lat or lng is like 250,000?
[16:31:09] <Derick> richthegeek: only with a 2d index, where you can set (have to, in your case) the index bounds
[16:33:01] <richthegeek> ok ... can the index parameters by changed on the fly later (probably not?)
[16:34:49] <richthegeek> I guess it's wether to treat the game world like Earth with standard coords like 53.203949 or if using integers would cause issues (which it seems like it wont)
[16:35:01] <richthegeek> eh, guess i'll do some actual real testing tonight
[16:39:44] <Derick> no, they can't be changed, but you can drop and recreate in the index :)
[16:40:03] <Derick> you can always scale by deviding everything by 1000...
[16:46:20] <Ryan_> Hey, I am using mapReduce and i was wondering if there is a way to not have keys with single values be in the array that gets returned? I am using finalize and just not returning the value if it isn't an array but it still stays in the returned array as null.
[16:47:43] <chet_> Hey there, I want to create a desktop application to compliment a website that uses mongodb.
[16:48:06] <chet_> What sort of database should I use for the desktop app?
[16:51:15] <_maes_> hi everyone. Is it safe to restore mongodb backups taken on 2.2 to mongodb 2.4?
[16:51:29] <_maes_> I can't find any comaptibility notes
[18:11:49] <Diplomat> but now I have to figure out how to transfer my database to there
[18:23:00] <lethjakman> hmmm...I was reading that mongo doesn't scale horizontally, if you try to shard it to different servers you can't use certain indexes. is that true? is there an easy solution for this?
[18:28:07] <cheeser> looks like only multikey indexes can't be used.
[18:34:55] <amergin> what would you recommend in this case: collection of documents where doc = { datasets: array, variables: array }. datasets is usually 1-5 in size (short strings), variables can have close to 100 items. Is there a reasonable structure that would allow me to 1) create an index for searching the right datasets & variables combination 2) allow the index to be unique.
[18:35:18] <amergin> as I understand, you cannot build an index for (array,array) combination
[18:43:48] <cornerman> hey, i have an unexpected problem using map/reduce + a finalize function with the out:reduce option.
[18:43:56] <cornerman> i try to do some kind of join over two collections:
[18:44:12] <cornerman> the first map/reduce-phase emits some objects from collection A to a temporary collection, and the second phase emits some objects from another collection B, which are then re-reduced into the previously filled temporary collection (out:reduce option).
[18:44:36] <cornerman> this works as expected until i try to use a finalize function in the second map/reduce phase.
[18:45:10] <cornerman> first, the reduce is correctly called on all freshly emitted values and the finalize function on every reduced value (including values with unique keys). second, the freshly finalized values are re-reduced with the objects in the temporary collection, but this time only the reduced values are finalized (the finalize function is not called for values with unique keys).
[18:45:40] <cornerman> i would have expected that every object is finalized in the last step, as this is the place, where i really know whether a join/grouping was effective. is this intended behaviour?
[18:46:08] <cornerman> as normally the finalize function is called on all object that are outputted
[18:48:41] <Diplomat> guys, backuping is as simple as "mongodump -d db -o my dir
[18:50:26] <cryptojuice> anyone know if mongoose can tell me which attributes were updated in a post save method?
[18:53:07] <cheeser> not a mongoose user, but "save" generally means a full document write vs an update
[18:53:25] <cheeser> not sure if mongoose redefines those terms or not
[18:55:27] <cryptojuice> thanks. im trying to execute specific functionality when only certain attributes change in a post save method. maybe there's a better way?
[18:56:06] <cheeser> nothing off the top of my head.
[20:34:27] <TylerE> So what's the current state-of-the-art for real time analytics schemas, and querying same with variable granularity?
[22:23:10] <laprice> Got a little question regarding selectors in mongodb. I have a bunch of documents like https://dpaste.de/gSv2
[22:23:52] <laprice> I am trying to extract all those that have an entry for "dub" in the "tags" array.
[22:24:59] <laprice> db.testset.find({ tags: [ "dub", "100" ] },{artist: 1} ) gets me a list of documents. But only those for which the dub rating is 100.
[22:25:53] <laprice> I'm wanting to get all the documents that have a tag "dub" regardless of their rating.
[22:28:10] <laprice> From the docs it looks like $elemMatch only works in projections?
[22:31:16] <laprice> db.testset.find({ tags: [ "dub", "100" ] },{artist: 1, tags: { $elemMatch: { .0: "dub" } }} ) gets me the contents of the dub tag