[09:02:02] <halfie> hi, I have an array in my data (each entry has this array), the array has bunch of dictionaries. How do I search based on a particular dictionary value?
[10:01:29] <ron> Nodex: yeah. and of course I have a new project at work where I need to create a pilot in 2 months, during which I also need to hire and train 10+ employees.
[10:01:41] <kali> resting: isn't that just a timzeone problem ?
[10:44:07] <kali> resting: mongo stores UTC. displaying the timestamp in the right timezone is up to you
[10:45:54] <resting> kali: hm..really..i see…hm..i thought it displays fine in other systems…let me see if i can do a quick check
[10:47:43] <resting> kali: hm..nope…some how this system is saving in UTC…i have a system that saves in JST fine
[10:48:58] <kali> resting: mongodb does not store the timezone, the driver translate the time object from the language in a simple utc numeric timestamp
[10:49:35] <kali> there is nothing out of spec in the behaviour you showed us, so i don't know how to help
[15:42:46] <Nodex> "Faster Counts: In many cases, counts in MongoDB 2.4 are an order of magnitude faster than previous versions. We made numerous optimizations to the query execution engine in order to improve common access patterns. One example is in a single b-tree bucket: if the first and last entry in the bucket match a count range, we know the middle keys do as well, thus we do not have to check them
[15:46:38] <Nodex> see if you can get some clarification if it made the cut
[16:32:30] <dreeerererere34> hi, how can i save array into mongo database?
[16:33:03] <dreeerererere34> which schema type i need to define in model?
[16:33:54] <nDuff> dreeerererere34: MongoDB is schemaless. If you want to store an array, just push a document with a JSON list.
[16:34:43] <nDuff> dreeerererere34: If your question is about some particular set of database bindings, we couldn't answer it without knowing the library you're trying to use.
[16:35:50] <dreeerererere34> nDuff i'm working with node.js and mongoose and i need to define type of data which i will use. i already tried to use schema.types.mixed and schema.json and both are working, but the problem is on output because it outputs numbers without arrays
[16:36:57] <nDuff> Ahh. Don't know Mongoose, so I'm not the person to help.
[16:37:19] <dreeerererere34> nDuff ok, thank you anyway
[16:44:37] <double_p> hi. tried an update from 2.0 to 2.2.3 by adding a new secondary rs. which works if you start with a full replication.. but if i try so w/ scp'ing the whole data_dir before, it fasserts. wasnt 2.2 meant to be container-compatible to 2.0?
[16:45:52] <bmcgee> hey guys, I'm trying to implement simple filtering with paging support on my collection. Basic idea is laid out here: https://gist.github.com/brianmcgee/5197686. Are there any standard patterns I should be aware of?
[16:51:17] <upayavira> Question: I've done rs.initiate(). I want to do the opposite, make it back into a single stand-alone node. Should I just restart mongo without replSet=rs1?
[17:04:05] <Mmike> Still no fix for debian installer?
[18:04:03] <lazyPower> WOOOO MONGODB PITTSBURGH was lastnight.
[18:18:56] <geoffeg> Someone needs to change that /topic :)
[18:54:48] <maginot> Hello fellas, I'm a little confused about the using the specific bson types in a json document for struct modeling. Is there a place where I can find an example of the types written in a json file?
[18:56:19] <maginot> is this right: { $timestamp : "2000-10-10 01:01:01", $date: "2001-01-01", $ObjectId: 12345... } ?
[19:05:51] <apetresc> Hey guys, I've got a strange problem; I've got a snapshot of an old Mongo server's data directory and I'm trying to attach a new mongo instance to it. I've set the dbpath properly and the lock file is appearing in the right place, but none of the dbs/collections that are supposed to be in there are showing up. When I do "show dbs' it only shows (local). Anyone know what's up?
[19:06:03] <apetresc> It's not a permissions issue, the mongo user is able to read/write to the data directory without a problm
[19:08:38] <lazyPower> Whats in your oplog? may have some pointer as to whats going on thats preventing the database instance from seeing the data
[19:09:33] <apetresc> lazyPower: is oplog just the regular log file? Here's the contents: https://gist.github.com/5199150
[19:39:04] <Mkop1> if I have a collection with documents like {name:'Whatever',owner:['John','Mary','Sue']}, how can I get all documents owned by John?
[19:39:57] <AAA_awright> find({owner:'John'}) should match
[19:40:38] <AAA_awright> And you can match any item an in Array to any item in an Array with... I forget, $in or $any or something like that
[19:41:37] <Mkop1> can I arbitrary sometimes have owner: 'John' and sometimes owner: ['John','Mary'], and find both with the same query?
[19:44:59] <AAA_awright> Mkop1: I work with that condition but I forget exactly how I handle it...
[19:45:34] <AAA_awright> Mkop1: Yeah, just use $in
[19:45:48] <AAA_awright> find({owner:{$in:'John'}}) but try it yourself
[19:45:59] <AAA_awright> And then that can take an Array too
[19:46:54] <AAA_awright> I'm not sure if there's indexing for this case, I doubt it, so the order in which they are specified may make a difference
[19:47:41] <AAA_awright> If you know Mary owns fewer documents than John you'd want to filter for that first, then 'John'... anyone know how this works exactly?
[19:48:04] <AAA_awright> Wait, that's for searching for all, not any in
[19:48:54] <Mkop1> oh. lack of indexing is a problem....
[19:57:03] <meekohi> Hey I'm trying to understand why a simple update doesn't work: db.twists.update({"created_at": null},{$set: {"created_at": +new Date()}}). What's the usual way of 'debugging' things with mongodb shell?
[19:57:42] <AAA_awright> Mkop1: That's just making sure you can do queries on single items in the array, it doesn't let you efficently do queries like "find documents where owner CONTAINS 'Mary' AND 'Sue'"
[19:58:32] <AAA_awright> Mkop1: The best you can do is search first for the Owner that returns the smallest set, then go through in O(n) time on the remaining owners listed
[19:58:36] <Mkop1> oh. for this particular purpose I don't need an index on BOTH owners
[19:58:41] <Mkop1> but good to know for the future
[19:58:45] <AAA_awright> Right, that works for you
[19:58:54] <AAA_awright> But I'm curious as to if MongoDB supports my case too
[19:58:59] <Mkop1> what I do need (unless I change my application)
[19:59:04] <AAA_awright> I suppose not, even though relational databases do
[20:33:42] <jmpf> running sharded 2.2.3 - do I need all my mongos upgraded to 2.4 && use --upgrade 1st? or can I just start doing rolling upgrades?
[20:43:15] <roel__> Hello all, need some info to point me in the right direction: is it possible to use mongo as main DB and link another DB behind it that is near-real-time and receiving updates, kind of streaming? To store certain properties by collection and trigger some applications when required.
[21:18:02] <therealkasey> so someone tried to do a mongorestore on a nearly full disk. aborted it when they realized the error of their ways. deleted the raw db files from /var/lib/mongodb. still have the lock issue. note that the journal files are north of a gig, and we've only got 714M free on the disk. are these journal files likely full of changes from the restore waiting to be applied?
[21:27:49] <WarDekar> is there a way to have an index on a nested item?
[21:28:24] <tworkin> whats the best way to store a ~4mb string? im afraid this pushes the max bson object size
[21:33:03] <therealkasey> i believe the limit on modern builds is 16MB