PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Thursday the 28th of November, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[01:08:21] <rpenha> Do someone getting "Error 109 : Pipe has been ended" with version 2.4.8 in Windows Server 2012?
[01:23:31] <Guest30957> Coming from MySQL. In the CLI, after I 'use database_name' do I need to do database_name.users.find() or can I just users.find() ?
[01:25:03] <Guest30957> nvm
[01:48:17] <leonmax> any one here can help?
[01:48:37] <leonmax> we're having problem with mongodb
[01:49:57] <leonmax> production problem
[02:56:30] <joannac> leonmax: erm, what kind of problem?
[09:56:27] <mikejw> when using $setOnInsert do I need to use dot-notation for any nested fields?
[09:56:52] <Nodex> yep
[09:59:34] <mikejw> thanks
[10:12:07] <robothands> hi. i'm installing mms, what ports do I need to open to mms.mongodb.com?
[10:28:47] <joannac> robothands: just 443 https://mms.mongodb.com/help/monitoring/tutorial/deploy-mms-in-production/#configure-networking-rules
[10:32:51] <mikejw> http://pastebin.com/3L96nKZh I've made this function to convert arrays for me (in php)
[10:33:58] <robothands> thanks joannac
[10:34:02] <robothands> is working
[11:50:31] <jwr> is there anyway to use $match on an arrayfield to only match documents where arrayfield has a length larger than 1?
[11:50:59] <jwr> using collection.aggregate
[11:52:22] <jwr> so {arr: ["foo"]} is not matched but {arr: ["foo", "bar"]} is
[11:55:59] <gildo> hi
[11:56:44] <Zelest> gildo rythms with dildo! *giggles* :D
[11:57:08] <starefossen> jwr: use $size http://docs.mongodb.org/manual/reference/operator/query/size/
[11:57:17] <gildo> hi!
[11:57:46] <starefossen> gildo: hi :)
[12:05:57] <jwr> starefossen: is there a way to combine that with $gt?
[12:07:50] <starefossen> jwr: no, but this is a good workaround: db.foo.find({'name.1': {$exists: true}})
[12:08:16] <starefossen> jwr: where name is the name of the key with containing an array
[12:17:28] <jwr> starefossen: thanks, that was a nice trick
[12:17:50] <starefossen> jwr: no problem bro
[13:04:20] <mikejw> what does it mean when I get an 'assert failed : need an object' error?
[13:04:36] <mikejw> I'm performing a find successfully and returning a single document...
[13:04:52] <mikejw> but when I use that same query again withing an update I get that :/
[13:05:00] <mikejw> *within
[13:05:17] <starefossen> mikejw: can you post the query here or on pastebin?
[13:08:08] <mikejw> http://pastebin.com/pjRZE1NJ
[13:11:26] <mikejw> this is what I'm passing to update..
[13:11:48] <mikejw> but because the arguments are in array maybe I need to call update.apply(args) ?
[13:13:35] <Nodex> mikejw : you don't need the and
[13:13:38] <Nodex> $and *
[13:13:53] <mikejw> ah...
[13:14:07] <Nodex> and is implied by mongodb by default
[13:14:17] <Nodex> i/e ALL parameters must be satified
[13:14:18] <mikejw> so what is $and useful for?
[13:15:19] <Derick> that is a good question, and I had a really good example
[13:15:38] <Nodex> I can't think of one off the top of my head
[13:15:38] <Derick> there are cases where you need to use the same key *twice* in a query
[13:15:50] <Derick> and as you can't have two keys wit hthe same name in a document, you need $and
[13:16:01] <starefossen> @mikejw muliple not equal, because in the nromal way you can't specify a field more then once
[13:16:14] <starefossen> s/nromal/normal/
[13:18:25] <Derick> https://jira.mongodb.org/browse/SERVER-1089 has some examples
[13:20:10] <mikejw> cool I think I get it :)
[13:27:43] <mikejw> Derick: thanks :)
[15:38:01] <tiller> hi!
[15:38:05] <Derick> hi
[15:39:36] <tiller> If I want to find users having a specific organisation and having a specific role within this organisation, do I have to use an aggregate, or is there a way to do it with a simple find() ?
[15:39:38] <tiller> ie. http://pastebin.com/iPvYr41k
[15:40:26] <tiller> (the two requests at the end are just non-working attempt :))
[15:46:45] <tiller> meeh, $elemMatch, sorry!
[15:56:44] <Nodex> tiller : you can also use dot notation
[15:57:11] <tiller> If I use the dot notation, it doesn't search within the same organisation
[15:58:27] <tiller> If I search for role R1 in the organisation O1, with the dot notation, I would retrieve users having the O1 organisation and having the R1 role into the organisation O2
[15:58:32] <tiller> don't I?
[15:58:43] <Nodex> RIght yes sorry, I didn't realise that;s what you anted
[15:58:45] <Nodex> wanted*
[15:58:49] <tiller> np :)
[15:59:11] <Nodex> but I am sure that registrations.foo:1, registrations.bar:1 would do the same job
[15:59:15] <Derick> tiller: props for arguing your point of view correctly :-)
[15:59:23] <Nodex> it's an implied $and
[15:59:24] <Derick> Nodex: no
[15:59:36] <Derick> regirstrations ?!
[16:00:12] <Nodex> sorry, my way gets the entire document not the elements needed
[16:00:23] <Nodex> end of a long day writing documentation :(
[16:00:28] <Derick> have abeer
[16:00:52] <Nodex> gonna have two haha
[16:01:56] <Nodex> just about finished a mongodb backed property exchange index where estate agents can plugin their systems and share property with each other in real time and with developers who may want to build services round it http://www.openpropertyexchange.co.uk/ :D
[16:03:23] <Derick> woo
[16:03:27] <Derick> congrats
[16:03:47] <Nodex> perfect for mongodb tbh, to many properties have non rigid schemas
[16:04:25] <Nodex> the property market has been strangled by the fixed rightmove designed schema for 20 years :(
[16:04:44] <Nodex> I have opened it up and allowed people to map between theirs and others effortlessly
[16:05:54] <Nodex> let's hope it sparks some innovation from app developers to build around the platform
[16:09:51] <Totorus> Hello all, Does anyone have a Python script for the MongoDB statistics for collectd?
[17:24:32] <mongodb_ubuntu> Would anybody be able to answer I question I have regarding the upstart script on ubuntu?
[17:24:46] <mongodb_ubuntu> Would anybody be able to answer a question I have regarding the upstart script on ubuntu?
[17:24:48] <mongodb_ubuntu> *
[17:42:58] <mikejw> so.. should this work as the parameters to a call to update: http://pastebin.com/jGERyWz4 ?
[17:47:52] <mikejw> ..because it's not
[17:50:32] <ubuntumongodb> Does anyone know whether I can pause / delay the mongodb upstart script upon shutdown to wait until another command has completed?
[17:51:34] <mikejw> I guess the update method in the mongo shell just doens't like paramters passed to it via apply :/