[00:53:02] <bartzy> Well, in the shell the spacing between each ObjectId in "subcategories" is much bigger. Any idea why the spacing is there anyway ?
[05:43:07] <zeroquake> wat server side setup do i need in aws , for storing gps data coming for android phonegap app , using mongodb ??
[06:36:56] <someprimetime_> I'm returning a collection of 10 items that I'd like to loop through and augment an easy date to… Basically something that grabs the created date and converts it to a `X time ago` string… and add it to each item in the collection. What's the best way to handle something like this?
[06:37:17] <someprimetime_> Was thinking a for in?
[07:05:46] <rishabhverma> Hey. I'm trying to install MongoDB on a fresh Ubuntu 12.04 LTS machine. But have been getting this error, "locale::facet::_S_create_c_locale name not valid" repeatedly.
[07:06:00] <rishabhverma> Running locale-gen also doesn't help resolve this.
[07:06:11] <rishabhverma> Any ideas on what should I do in such a case/
[08:56:05] <Katafalkas> Hey, I am wondering which image on amazon ec2 I should use for mongodb. 10gen by default uses standard AMIs. But I do like ubuntu. Also there was some benchmarks and they show that mongodb runs better on ubuntu. Any thoughts on that ?
[09:13:24] <richwol> I've seen a huge company store date/time as a string in the format 2013-03-07 09:10:12, the idea being it's easy to query (for example, to return all records matching a particular day you could do /2013-03-07/. I haven't read much about this technique and the performance of it - does anyone know if it's faster this way than doing a similar query against native date objects? Any advantages/disadvantages would also be appreciated so I can make a well informed d
[09:16:35] <saby> I have a collection containing a field status: {status.algo1: "required", status.algo2: "running", status.algo3: "required"}
[09:27:56] <eaSy60> richwol, Nodex: Thanks, I'm just coding a migration script so I don't care how much dirty it is
[09:27:57] <Nodex> some poeople store a date object ... date : {y:2013,m:03,d:07}
[09:28:05] <richwol> sounds good, the only issue for me is that I need to query on different timespans.. for example /2013-03/, /2013-03-06/, /2013-03-06 10/ etc. I guess for that reason I'm best off using the Date object
[09:28:44] <Nodex> I would use range query's for timespans
[09:29:00] <richwol> Ah ok, another interesting approach. My only concern about this is the speed - it's gonna be a big table so whichever approach is fastest is gonna have bonus points for me!
[09:32:19] <saby> i have a field status containing multiple subfields, like status.algo1: "required" and stuff. Is it possible to get all documents which have any subfield's value as "required" ??
[09:34:14] <richwol> nodex: Awesome. I suppose the other benefit of using the date object is that I can cater for data stored in different timezones.. the other methods are a bit limited for that
[09:34:25] <saby> is there a way to do status* : "required"
[09:34:31] <Nodex> saby : please pastebin a document
[09:34:36] <saby> such that I get all the records for which any status field is required
[09:37:04] <saby> so Nodex I want to keep the find query generic as new subfields could get added in near future so I would like to fetch any doc with a status as required
[11:09:23] <multi_io> when you're storing "1:n relations" using DBRefs, do you commonly store the DBRefs (or simple IDs) on the n side (as a single reference), or on the 1 side (as an array of references)?
[13:19:29] <Zelest> I'm having huge issues with failover and mongo in our replicaset.. :/
[13:19:55] <Zelest> Whenever the master dies, the secondary becomes master, but php-fpm give me "no suitable candidate" even if the master is available and up..
[13:20:03] <Zelest> same happens if the master goes down and comes back up short after
[13:20:09] <Zelest> only way to solve this is to restart php-fpm :/
[14:51:35] <jtomasrl> i have a items document that have nested orders with a created_at field, is it possible to order by that?
[14:51:43] <petto> I guys... I'm trying sort collection result by text field. But it not work with accented character. For exemple (a,b,c,d,v, á)
[15:04:29] <petto> kali: =/ How can I solve this? Or how can I improve this sort?
[15:06:05] <kali> petto: the only thing you can do is normalize the "title" by discarding the accents (and maybe case too). that will improve the situation for some languages (not all of them)
[16:05:12] <qhartman> I see that the method to increase the size of a capped collection in 1.x is to create a new larger collection and then copy the contents of the current one over to it.
[16:05:39] <qhartman> Is that the same process in 2.x, or has the feature I see talked about online about a more direct way to do that been implemented?
[16:16:00] <coogle> Does anyone know what this error means?
[16:16:00] <coogle> Couldn't pull any geometry out of $within query:
[16:16:06] <coogle> Couldn't pull any geometry out of $within query: { 0: [ -73.98085499999999, 40.75547299999999 ], 1: 0.0252321865809176 }
[16:17:23] <coogle> never mind... it's because i didn't have a 2d index
[16:26:58] <bartzy> This is not expected - it should be just the string, not an object like that.
[16:27:30] <bartzy> What about MongoId implementing JsonSerializable ?
[16:32:24] <Derick> bartzy: file a feature request please - however, I don't quite agree it should just be a string, as it's a bit more than that
[16:32:29] <Derick> why are you turning it into JSON?
[16:32:40] <bartzy> Derick: To forward it to our JS app.
[16:32:52] <bartzy> our JS app need to know the id of that item/object/whatever...
[16:33:03] <bartzy> and that's our representation for the id (the ObjectId of the document)
[16:33:29] <bartzy> and now instead of going to photo.id (in JS for example), it needs to go to photo.id.$id , which is weird...
[16:33:35] <Derick> we do still have to support php 5.2 though.. and jsonserializable is 5.3 (or 5.4 even)
[16:34:07] <bartzy> Derick: I don't understand the reasoning behind having a json like that: {"$id":"5137e3fca4c9deee05000001"}
[16:34:23] <bartzy> It's not that json_decode would bring back MongoId to "life", it would just be stdClass
[16:34:28] <Derick> it's the same as vardump... so it makes sense if you look it like that
[16:34:44] <Derick> I do indeed not like the "$id" name though, as it's confusing
[16:34:51] <Derick> (and difficult to use in JSON)
[16:35:10] <bartzy> so most users that are just doing json_encode($results) from a mongo query to their JS app - need to go over each document and cast the MongoId to string ?
[16:35:30] <Derick> well, you just said you can do photo.id.$id yourself...
[16:35:54] <Derick> we can't really change behaviour either :-/
[16:36:16] <Derick> I think in the end, it would be best if you can specify your own classes instead of MongoID/MongoCursor etc, so that you can modify behviour yourself
[16:37:50] <bartzy> Derick: Wouldn't that be pretty slow ?
[16:38:11] <Derick> maybe, but atleast we don't have to make a decision
[16:38:34] <Derick> implementing jsonserializable now, and changing it to a string for that will break BC, which we can't do before 2.0 (and that we'd like to avoid)
[22:15:10] <redsand> is it possible to add a new shard to an existing set if the set already has authentication enabled?
[22:38:13] <toxster> hi, i am setting a sharded cluster, do i need to have mongod running on each server? now mongos complains that it's using the same port, or does mongos tae over what mongod does?
[22:39:15] <toxster> should i just kill all mongod processes?
[22:42:29] <julian-delphiki> toxster: you'll want to change what port your mongod is listening on.
[22:43:01] <toxster> julian: ok do i need the original mongod daemons
[22:49:19] <toxster> only 1 mongos should be needed when i test right, the other is just for failover
[23:28:11] <toxster> weird, when i run mongos on port 27020, mongod --configsvr on 27018, and 10gen mongo 2.2.3 on 27017, when i start mongod on 27017 i get Fri Mar 8 00:20:15 got signal 2 (Interrupt), will terminate after current cmd ends
[23:33:12] <toxster> seemed to be that the configsvr has t be started after mongod