[08:43:02] <devians> hi, can anyone help me with the user model in mongo?
[08:43:42] <devians> I've made a user admin and a root account like the docs say, and I've made my application user and given them a role over the application db, but I can't login against the application db because it doesn't exist yet (as far as I can tell?)
[09:47:44] <sjose_> Hi, how to query an embedded document using its id..?
[09:51:08] <sjose_> kali: I'm generating ObjectId for embedded document using _id = ObjectId, but I'm not able to fetch even using '.' respective item using id Eg: ObjectId("54b761dcba090148f2139c9b")
[09:51:51] <kali> sjose_: show us a typical document and what you've come out so far as a query
[09:52:17] <sjose_> kali, This is the query : db.training_partner.find({'trainings._id':ObjectId("54b761dcba090148f2139c9b")})
[10:15:27] <sjose_> kali, I want to fetch using subdocument Id...
[10:15:50] <kali> use $elemMatch in the projection clause
[10:17:52] <sjose_> kali, like this ...db.training_partner.findOne({'trainings._id':ObjectId("54b761dcba090148f2139c9c")},{$elemMatch:{_id:ObjectId("54b761dcba090148f2139c9c")}})
[10:18:34] <kali> you need a a { trainings : { .... } } around your $elemMatch. look at the doc
[10:25:40] <sjose_> kali, It worked perfectly .....Thanks Very Much!!!
[11:07:22] <edgar> Hi all, my .find and .count return incompatible results with the nodejs driver (only with version 2.0), any ideas ? Here is the link to the question I asked on stackoverflow : http://stackoverflow.com/questions/27961938/mongodb-2-0-nodejs-driver-find-and-count-return-incompatible-results
[12:42:46] <Infin1ty> I am running version 2.2 at the moment, i'm trying to find out what is the reason for creating local oplog on the config servers on 2.6?
[14:23:46] <dfinn> I'm trying to enable directoryPerDB but getting an error that it doesn't recognize that entry in the config file, anyone know what I'm missig here?
[14:48:08] <kiko_> basically what I want is an object that is to be persisted but inside it has a map like this Map<String, MyClass> map1 = new HashMap<String, MyClass>
[14:54:08] <mwhooker> Hi all, wondering if anyone can help me convert a sql statement to 2.4 mongodbese https://gist.github.com/mwhooker/c601ff70d20e303a3e8f
[15:05:29] <spuz> I'm having trouble writing a query. I need to find all documents where the fields "x" and "x.y" exist and are not empty. x and y are both arrays. I've tried every combination of explicit and implicit ands that I can think of but am not getting the right results. Any ideas where I can get more info?
[15:05:31] <cheeser> a simple global search and replace, though
[15:06:16] <Bico_Fino> Hello, I'm trying create a user and getting this message 2015-01-15T13:03:18.912-0200 Error: couldn't add user: not master at src/mongo/shell/db.js:1004
[15:06:29] <Bico_Fino> I'm using this doc http://docs.mongodb.org/manual/tutorial/deploy-replica-set-with-auth/
[15:08:20] <Bico_Fino> forgot to run rs.initiate()
[15:25:16] <spuz> is it possible to search mongodb documents for a value without knowing the field name?
[15:27:57] <mwhooker> hi all, want to ask once more for help converting this sql query to mongodb. I'm not sure it's possible, but hope to shed some light https://gist.github.com/mwhooker/c601ff70d20e303a3e8f
[15:40:09] <gregf_> i'm on ubuntu 12.04, mongo client - 2.0.4. i needed to upgrade to the latest mongo client
[15:40:30] <FunnyLookinHat> If I'm using a collection to gather a bunch of data points to run reports at a later date, is the general strategy to index any field you would want to report on - OR - to iterate sets based on a more broad index field?
[15:42:30] <cheeser> you index fields you want to query against.
[15:42:51] <cheeser> just because it shows up in a report doesn't mean you need to index it.
[15:43:54] <FunnyLookinHat> cheeser, is there a way to determine how large an index is ?
[16:31:40] <Raffaele> Hello. Some time ago I did cross-compile mongodb for a MIPS platform but I had to make more than a couple of changes in both the code and the build scripts
[16:32:02] <Raffaele> Now I'd like to contribute these changes back to the community. What's the actual process for that ?
[16:34:55] <Raffaele> So i understand I'd need to create a SERVER Jira ticket. Would I be allow to do that or do I need some sort of permission granted from someone ?
[16:41:39] <cheeser> you should be able to create one.
[20:00:37] <blizzow> I'm trying to do a mongodump with a query based off a field called date that I have in my records (format YYYYMMDD). so I do: mongodump -h myrouter -u myuser -p mypasswd -d mydb -c mycollection -q '{date: { $gt: ("20140704") } } '
[20:00:41] <blizzow> it fails and I get: "assertion: 16619 code FailedToParse: FailedToParse: Bad characters in value: offset:13" What's wrong with my query field?
[20:01:16] <harttho> why the ( ) around "20140704?"
[20:05:59] <blizzow> kali, and harttho. thanks! That worked. I had previously done dumps with a query like this: -q {_id: { $gt: ObjectId("54188da10000000000000000") } }
[20:05:59] <blizzow> I guess I'm not understanding why the () would work with the objectID but not date.
[20:16:17] <harttho> A date object would look like ISODate("2014-02-10T10:50:42.389Z")
[20:16:23] <harttho> The way you're saving it, it's just a string
[20:17:21] <harttho> also new Date(millis) will create an ISODate object in there too
[20:17:48] <harttho> Both will have useful functions associated, where your string you're currently storing is just a string
[22:07:13] <Torqable> is there a good way to validate a schema
[22:11:01] <Torqable> was thinking I could validate using the jsonschema lib, but it doesn't look like I can enforce field length with that
[22:11:04] <harttho> Ideally in a centralized place that allows easy versioning
[22:11:09] <Torqable> like 200 characters for example
[22:12:23] <harttho> Depending on how comfortable you are with json, you can create a rich document that contains the info like that
[22:12:33] <harttho> As you need stricter validation, just add it on there
[22:43:04] <daidoji> hello #mongodb, I know I'm cross-asking but does anyone know why MongoEngine validation for ReferenceField requires that it be an ObjectId to save()?
[22:51:50] <daidoji> actually it seems related maybe to https://github.com/MongoEngine/mongoengine/issues/541