[00:32:09] <the8thbit> I want to sort a collection by a field inside of a subdocument inside of an array. Is this possible?
[00:34:01] <joannac> the8thbit: if your array has multiple documents, how would that sort?
[00:34:26] <the8thbit> joannac: I only want to sort by one particular document in the array
[00:34:56] <the8thbit> I have a collection called 'badges' and each badge has an array of 'owners', and each owner has a 'username' and a 'date'.
[00:35:17] <the8thbit> I want to sort by the owner's date (the date they acquired the badge)
[00:38:39] <joannac> I think no, this is what I was thinking of http://docs.mongodb.org/manual/reference/operator/projection/positional/#sorts-and-the-positional-operator
[00:39:51] <the8thbit> <joannac> I think no <--- its not possible?
[00:40:55] <joannac> You could potentially try using the aggregation framework
[00:41:06] <joannac> but I don't think you can do it via a normal find()
[00:41:16] <the8thbit> joannac: I dont understand how aggregation works :(
[00:42:29] <joannac> :/ read the docs? or do M102 (which goes through it)
[00:47:15] <the8thbit> actually, looks like they're on youtube
[03:44:37] <tpayne> Hello. how can i return just a single specified value in an array? Like ["1","2","3"]
[03:45:06] <tpayne> each time i return something, it returns [{"key":"1"},{"key":"2}]
[12:24:14] <eskatrem> hey, noob question here: I have mongodb running on machine A, and typing on machine B: mongo --host myIp --post myPort gets me a "connection refused"
[12:28:32] <Nodex> default mongo binds to 127.0.0.1 now
[12:32:05] <eskatrem> well, that's why I ran it with --host myIp
[12:34:46] <thanasisk> how can i install 2.6.1-rc0 on ubuntu 12.04? apt-get install mongodb will install 2.6.0 (which owing to a bug we cannot use)
[12:41:54] <thanasisk> mongodb-org is already the newest version. <— im sure that in another box configured by someone else i could get the 2.6.1-rc0 by apt-get install
[12:42:05] <thanasisk> Nodex: thanks for clearing this up :
[12:42:57] <Nodex> I am not sure what version mongodb-org-unstable is
[12:43:06] <Nodex> it would suggest its the latest RC
[12:45:12] <thanasisk> so, how do I install the latest RC on ubuntu 12.04?
[13:05:22] <thanasisk> i installed from tarball - thanks for the help Nodex
[13:13:06] <thanasisk> is there an estimated release date for 2.6.1 stable?
[13:13:40] <thanasisk> i recall from a JIRA ticket that it should have been yesterday the 28th
[13:27:54] <cheeser> i think the official line is "real soon now." :)
[13:39:45] <miqui> newb question: i realize that the OS will manage mem for mongodb's cache mem, etc..etc.. but just wondering i have a small collection to deal with with(< 40 objects)
[13:40:08] <miqui> so, i should be "ok" with a 1gig VM ?
[13:40:45] <miqui> only a few things running.... in the same VM... with large swap file
[13:42:43] <Nodex> depends on how large the objects are
[13:43:17] <miqui> Nodex: hmm, yes, lets say <10k bson
[13:43:27] <Nodex> but seeing as there is a 16mb limit on documents currently then you should be fine :)
[13:43:49] <Nodex> less than 0.5mb will NOT use 1gb of ram
[13:44:44] <miqui> Nodex: if true that mongo will release its cached ram because the OS asked it to for another process...and then i can live with that..
[13:45:05] <miqui> Nodex: i just dont want it to hog things...
[13:45:13] <Nodex> the OS will just eject using LRU
[13:45:49] <miqui> Nodex: want to replace mysql (very small db, one table 20 records, key/val pairs)
[14:19:36] <pure> So, I'm using the C# driver. If I do something like 'collection.FindOneById<Entity>().Name = "foo";' do I need to explicitly call collection.Save() or collection.Update()?
[14:47:57] <pure> So it might be a good idea to put a collection.Update() call in my property setter?
[14:54:07] <rspijker> don't know the C# driver, but in general you would have to call save
[15:02:27] <cheeser> pure: no, it wouldn't be a good idea
[15:02:40] <cheeser> it could potentially generate tons of traffic.
[15:04:46] <pure> What's the best way to make sure client and server are always synced then?
[15:57:09] <ninja_p_> when creating an index using the php client is order important? - we create the index on the server with ensureIndex({a,1,b:1,c:1}) but adding via PHP leaves no way to ensure the attribute order (its just an assoc array)
[16:08:24] <Nodex> and php will keep the order you give it in the array
[16:09:03] <Nodex> (arrays would not be much good without a predictable order else :P )
[16:30:17] <gsd> is there a mongo call that will show me the connection pool stats, like the number of avail connections in the pool
[16:54:37] <hydrajump> if you use pymongo and save a query in the var cursor. when you loop through the docs in the cursor how can you skip every other result. It's probably more a python question but I thought I'd try here
[18:04:20] <moleWork> whenever i restart the mms monitoring agent... it won't reconnect to my server, it says "Either not primary agent, or no hosts configured. Sleeping...
[18:35:04] <NaN> how can I update an inside doc if the inside doc is in an array? { foo: [ bar: { baz: true }, baar: { baz: false } ] } <<< update foo.baar.baz ?
[18:38:23] <Edravis> Hi! I think I found a small error in the web mongodb manula, how can I report it?
[18:58:48] <NaN> I mean, why does the positional operator needs the query with the array field?
[19:16:17] <skot> NaN: because the the positional operator ($) is just a specific array element which is replaced during the update, if your query doesn't query an array, then it can't match anything.
[19:23:46] <frodo_baggins> I keep getting: planner returned error: need exactly one text index for $text query, at the beginning of my code I call db.<collection>.ensureIndex({"text": 1}, callback);
[19:24:44] <moleWork> how do you set "client name" in node.js native driver with a description... like instead of conn1-10 i can set it to myapp1-10
[19:25:20] <moleWork> i can see like TTLMonitor and other processes can do it, i was wonder if it was possible to prefix the client in the node.js connection pool options
[19:34:14] <NaN> skot: but find with _id and find with _id and array element gives me the same results
[19:42:15] <skot> NaN, they give you the same document but not the same context in that document for the update.
[19:47:47] <ranman> NaN: this may elucidate https://gist.github.com/ranman/289fc4b0561b2f72f4c3
[19:59:22] <ThePrimeMedian> anyone had this issue? MongoError: exception: nextSafe(): { $err: "Can't canonicalize query: BadValue unknown top level operator: $inc", code: 17287 }
[20:03:11] <ThePrimeMedian> hell_razer: it's a mongoosejs schema call, http://hastebin.com/ifodafofeh.coffee
[20:03:33] <NaN> skot: where can I read more about that 'context'?
[20:03:58] <NaN> ranman: thanks man, but what if I need to update another arrays? should I need to include them in the query too?
[20:04:28] <ranman> NaN: could you create an example?
[20:04:55] <hell_razer> ranman, i am not familiar with mongoose, but your query looks really starnge, what exactly you want to do?
[20:04:55] <ranman> NaN: I'm not super smart and it's hard for me to talk about these things in abstract terms especially when vim is open in another window :P
[20:05:12] <hell_razer> ThePrimeMedian i am not familiar with mongoose, but your query looks really starnge, what exactly you want to do?
[20:06:22] <ThePrimeMedian> hell_razer: i just want to update the doc, increment the counter, and if not exist create the document with a count of one.
[20:06:36] <ThePrimeMedian> i'll look into it a little further and come back.
[20:06:44] <ThePrimeMedian> thought the error might of been mongodb 2.6.0
[20:06:57] <ThePrimeMedian> because it was working with 2.4.9
[20:13:06] <hell_razer> ThePrimeMedian, therei no breaking changes in mongo 2.6
[21:16:45] <frodo_baggins> I've managed to create a text index, but when I do a search, I get null for the results. Code here: https://gist.github.com/blafreniere/e6cc730e6b00330af0d2
[21:22:59] <frodo_baggins> could I have needed to do... .toArray(error, document)?
[21:23:19] <frodo_baggins> oh, yes, it appears that is the case.
[21:24:02] <ranman> frodo_baggins: figured that out just as you typed that
[23:45:54] <mfen> i can query that object directly through db.user.find. i can query the interview directly with db.interview.find({_id: ObjectId('yyyyy')}
[23:46:34] <mfen> but i can't query the interview by matching through the user object. i don't understand why there's no simple example of this. in any other database it would be a trivial foreign key join. (and mongoengine seems to have no problems doing it.)
[23:48:34] <mfen> btw i'm running these queries in the mongo CL shell