[01:41:38] <jparkton> if I have a collection and have email addresses in there how can I create a variable that will access those emails? really new to mongo and meteor so just having fun but not sure how to grab each email as a variable?
[01:44:22] <diegows> tomorrow I'll have a talk about mongodb, does anyone recommend a data source to test mongodb?
[04:37:44] <testing22> i'm trying to use the aggregation framework to count subdocument items. example: http://pastebin.com/wU4BrEeN the top is the raw document, the bottom is the output that i'm going for with the pipeline. i've found a way to do it with adding each to a set and then unwinding one at a time but it piles up lots of ram for such a simple (i'd think so at least) task. is there any efficient way to do this?
[04:40:49] <testing22> i could add each to a set and then count the set with sum:1, but that requires the unwind which becomes huge with all of the various sets. is there a better way to determine the side of the set within the pipeline?
[06:06:22] <Fandekasp> I'm a new user to mongo. I'm tring to add a field profile.website to my users, but when I do so, it removes the other profile fields, eg profile.blurb : http://sprunge.us/QHfC
[06:06:51] <Fandekasp> how can I just edit/append new fields without removing the existing ones ?
[06:09:26] <Fandekasp> I tried $addToSet, but it raises error "Cannot apply $addToSet modifier to non-array"
[06:18:57] <Fandekasp> damn, why didn't I think of this :)
[06:19:02] <Fandekasp> thank you very much joannac
[06:28:23] <Fandekasp> joannac: do you know a way to join elements from an array ?
[06:29:36] <Fandekasp> I would like to format ['http://www.google.com', 'http://www.facebook.com'] in 'http://www.google.com, http://www.facebook.com' for example
[06:33:05] <Fandekasp> hmm I tried to go another way with a for loop, but it doesn't update anything
[06:33:07] <Fandekasp> db.users.find({'websites':{$exists: true}}).forEach(function(user){ for (w in user.profile.websites){ db.users.update({$set: {"profile.blurb": user.profile.blurb + '\n\t - ' + w}})} })
[06:35:26] <Fandekasp> hmm I had forgotten the id in the update, but still not there yet
[06:39:23] <Fandekasp> got it, websites $exists: true return no results
[06:42:33] <Fandekasp> and for loop don't seem to work
[06:52:54] <rohitksh> Hey Guys, can anyone help me with sharding?
[10:48:26] <jdar> then i can authenticate as expected.
[10:48:49] <jdar> via db.authenticate("testadm","testadm")
[10:48:58] <jdar> should I file an issue for this?
[10:51:01] <kali> jdar: start by looking if it's not filed already :)
[10:52:42] <kali> jdar: have you identified what's the first version where it does not work ?
[10:54:12] <kali> jdar: iirc there were intended and documented changes on addUser between 2.2 and 2.4, so it may be just that
[10:58:24] <jdar> thx kali - I found this one as well: https://jira.mongodb.org/browse/JAVA-1039?jql=project%20%3D%20JAVA%20AND%20text%20~%20%22addUser%22
[10:58:28] <jdar> Deprecate DB.addUser and DB.removeUser
[10:59:18] <jdar> the problem is there a way to add a user that works on 2.5.3+ and older versions?
[11:01:38] <jdar> does this mean that a simple driver update to the upcoming 2.12.0 should do the trick under the covers?
[11:02:21] <jdar> will this new driver also work with older mongodb versions?
[12:36:20] <movedx> I have been handed a MongoDB cluster, it's two replication sets consisting of three shards each. I am trying to determine if the databases are being sharded and if so, what is the sharding configuration of each one. I'm logged into the router and I've executed 'sh.status()'. It's telling me "partitioned: false" for a lot (99%) of the databases. Does this flag represent the sharded nature of that particular database?
[12:39:04] <movedx> Right I am guessing it does, as the "test" database, as it's been named, has shard key information and chunk information.
[12:49:59] <kali> movedx: two replica set of three shards ? really ? :)
[13:19:37] <movedx> I don'tknow mate. Don;'t be a smart arse? :)
[13:27:18] <Nodex> I can safely say that you probably won't get help if you abuse people
[14:05:58] <movedx> kali: I apologise. I'm having a bad day. Thanks for your input. Clearing your language means I am lacking some understanding somewhere. I'll work it out.
[14:06:42] <dab> using mongo with PHP - is there any way to get the cursorID and then reconnect to it with a second instance? the reason is if i have a script running that takes a long time, i can have it run in batches and not have to rebuild the cursor which takes a while with sorting
[14:07:08] <kali> movedx: that was my point, really. if you're confused what's where in replica set and shards, your first stop is sharding and replication overview documentation pages
[14:12:26] <movedx> kali: Would I be more correct to say I have three shards in a replication set, in a cluster of two replication sets?
[14:13:03] <dab> Nodex: i was looking into some of the docs, and it appears at the low level it might be possible, but that the commands are missing from the php driver - i think it may have been implemented in java here : https://jira.mongodb.org/browse/JAVA-178
[14:13:16] <movedx> Our setup here seems to be: {0,1,2} <-> {3,4,5} where the numbers are shards.
[14:13:52] <movedx> ANd {0} and {3} are the primary shards in each set.
[14:25:07] <kali> movedx: nope, you're still confusing :)
[14:25:20] <kali> 1 shard is (usually) a replica set
[14:25:49] <kali> my guess is you have two shards, each is a replica set containing three replicas
[14:32:48] <movedx> Yes, that's it. I think I am confusing a "shard." We have three replica sets in a shard, aye.
[14:33:12] <movedx> So I assume the shards are also in sync somehow?
[14:55:58] <svetlins> Hi guys, in the development version of MongoDB(v2.5.4-pre-) a query of the type db.stuffs.update({"a" : 1}, {"$push" : {"b" : {"1.5" : 1}}}) no longer works. It’s printing "1.5 is not valid for storage." in the mongo shell and silently failing when used from ruby driver(moped). It works on 2.4.7 and all older versions we've used. Does anybody know if that’s the expected behaviour or should I add a bug to the JIRA?
[14:56:46] <Nodex> I would imageine the dot is the causing factor
[14:57:59] <movedx> Do you lot run the mongos instance directly on your application servers, or as separate, standalone systems?
[15:07:24] <svetlins> Nodex, that's true - no dot, no problem, but our application stores objects in an array which are supposed to have "float" keys
[15:07:55] <svetlins> we could change that but we have a lot of data already that will need to be migrated
[15:09:22] <movedx> Hmm, if it takes ten seconds for a replica set to find a new primary, if not longer (because that doesn't include the time to vote and promote), then what happens to the incoming write operations? Does Mongo simply return a failure notification?
[15:10:45] <Nodex> svetlins : that really was a bad design decision, tbh I am surprised the driver allowed it this long
[15:12:48] <Nodex> at some point you will have to migrate as I am sure that will make it into production code in the near future
[15:13:24] <svetlins> yeah, I guess so. thanks for the advice
[15:13:51] <Nodex> nothing to say you can't run your code on the current version and migrate slowly
[15:28:10] <Honeyman> Hello. Any good docs or hints available on the optimization of aggregation queries? E.g., if I want to sum the values of a field in multiple documents, is it worthy to do [$match, $project, $group($sum)], to decrease the total byteflow in the pipeline, or is it enough to do [$match, $group($sum)] ?
[16:08:48] <movedx> Ah, now that I've made a quick Visio diagram of our infrastructure, it makes more sense to me now.
[16:09:18] <movedx> Still, trying to pull a sub-document from another document is a pain to understand.
[19:02:22] <Goopyo> no problem. hkar mongodb is a document database so it makes most sense typically to put those 20k files in the user document (up to 16mb), might make sense to go to something relational if its they are being stored and related seperately
[19:45:20] <gavitron> so let's say I have ~ 40GB of data on a replica set, and one member was offline long enough to go stale. (RS102). is there any reason I can't rsync from a non-stale replica? (as opposed to a full copy or snapshot of same replica)
[19:51:50] <yodude> whom can i ask a few questions about mongodb in private?
[22:18:58] <Rashad> The thing is that I would really like if I could decide whether MongoDB is going to be at least safe for that kind of app, without having to go into the debate between relational and nosql.
[23:51:40] <zymogens> I see that the syntax for $gt is {field: {$gt: value} } - Just wondering can value be another field ... i.e. show docs where 'dueDate' is less than 'now'?
[23:52:01] <zymogens> sorry not 'now' but another saved date.