[00:10:25] <feathersanddown> Using morphia, is possible to add an ObjectId in an embedded document ? In documentation say: ( https://github.com/mongodb/morphia/wiki/EntityAnnotation#embedded ) that "For example, the Hotel class above might have an Address. The Address would be an inseparable part of the Hotel, would not have its own ID, and would not be stored in a separate collection." but I need to identify an object...
[00:12:20] <Boomtime> I have not used morphia, but what happens if the member is of type ObjectId ?
[00:13:17] <feathersanddown> and that array is inside root document: root{ _id:"234...fds" , myArray: [ {_id."f.....3", item: "a"}, {_id."df.....2", item: "b"}, {_id."32.....1", item: "c"}, .... ] need to modify item array that have _id:"32.....1" (item c)
[00:13:36] <feathersanddown> nothing, won't write it into database
[00:15:00] <Boomtime> what does it say when you try?
[00:26:17] <Boomtime> you probably don't need @Embedded either since it is in an array, but i'm not sure about that
[00:26:57] <feathersanddown> NoId complained about cl.medsolutions.modulos.ecg.Evento. : No field is annotated with @Id; but it is required <---- let me try without it
[08:23:51] <mrcloud> hello. Maybe you can help me with this. I'm new with mongodb but I must implement an app with crud operations over question objects. My problem is that I don't see how to structure all to be able to store every type of question. Here I have an small description http://pastie.org/9613226 Could you help me with this?
[08:55:32] <pierre1_> hi everyone. How do I find a document that doesn't have a certain element in certain an array attribute?
[11:39:43] <dazzled> http://pastebin.com/Rxqedc0P is something like this possible to do? this form gives me syntax errors
[12:34:05] <Snii> Hi, I have a collection with object such as {name:"a", revision:1}, {name:"b", revision:1},{name:"a", revision:2} - and I want to get only the latest revision for each name - What is the best way to so this?
[12:34:31] <Snii> I'm thinking of using a mapreduce each time add a new revision and have it create a new collection with only the latest revision listed for each name
[12:53:49] <Atomic> hey i was wondering if anyone could shed some light on this warning i'm getting while running a big update of every field in one of my largish (~30gb) collections
[12:54:48] <Atomic> i'm pretty sure my db.eval() is blocking so i can't run any queries to see if my update is working
[13:33:06] <feathersanddown> Hi!, using morphia, is needed to instantiate the @id variable ?
[13:53:16] <salty-horse> hi. I added a new shard to my cluster, so a collection is busy rebalancing. could this explain this error I get on long counting queries? "shard version not ok in Client::Context: version mismatch detected"
[14:07:25] <richthegeek> i'm totally aware this is a nebulous question before I ask it, but hopefully I can get an answer at bit more in-depth than "it depends" so ...
[14:07:49] <richthegeek> is it better to cache frequently-read and infrequently-changed records in the application, or to just read them directly each time you need them
[14:08:14] <richthegeek> assuming frequently read is, say, 50 times a second, and infrequently-changed is like once a day
[14:08:38] <richthegeek> given mongo will keep it in memory, how fast will it return such records?
[14:09:15] <richthegeek> assuming that "keep it in the application memory" is better, I wrote this: https://github.com/richthegeek/mongo-cached-find
[14:09:23] <richthegeek> but just wondering if the effort is worth it
[14:13:56] <Atomic> here's a question: how much faster (if at all) is a query on the _id field over a query on an indexed, integer value field
[14:28:47] <spenguin> Hi everyone. How would I make it so that two documents in a collection couldn't have a field with the same value, but so that other documents in other collections could have the same field with the same value?
[14:30:06] <cheeser> a unique constraint on an index
[14:32:04] <Atomic> another question: would a big update run faster with logging disabled (ie to save the time of logging each update * n)
[14:47:26] <spenguin> thanks cheeser and hasantayyar
[14:49:36] <freeone3000> Is it possible to return values from multiple stages of an aggregate pipeline? For instance, a match, a match, a group (take results from here), then a group (take results from here, too), with the return being the union of those two?
[15:04:28] <richthegeek> freeone3000: no, not exactly
[15:04:38] <richthegeek> freeone3000: you can use $out after the first stage to store the first results, then aggregate those
[15:05:27] <richthegeek> znn: that's invalid javascript, try either for (var color in colors) db.colors.insert(color) or colors.forEach(db.insert.bind(db))
[15:05:28] <znn> actually, the colors variable looks like colors = [{_id: ObjectId(), color: "red"}...
[15:05:49] <richthegeek> your for loop needs braces, basically
[15:05:51] <freeone3000> richthegeek: http://docs.mongodb.org/manual/reference/operator/aggregation/out/ says it must be the last stage in the pipeline. So, in order to do a two-stage aggregate, I must run two pipelines and use a temporary table?
[15:06:07] <richthegeek> freeone3000: yes, if you want results from halfway through
[15:06:52] <freeone3000> richthegeek: How does that work with multiple concurrent queries?
[15:07:19] <richthegeek> i'm not sure of the internals to be honest, but for this specific query you need to ensure you run them in order
[15:07:49] <richthegeek> possibly use a hash of the full pipeline to name the temp table to avoid conflicts
[15:13:06] <freeone3000> richthegeek: Okay, thanks. It looks like the best way to do it in one query would just be to handle the aggregation client-side.
[15:13:28] <richthegeek> freeone3000: yeah, if the aggregation is simple there's no reason not to
[16:12:21] <ells> any reason why http://mms.mongodb.com/help/tutorial/install-backup-agent-on-osx/ cannot auto redirect to http://mms.mongodb.com/help-classic/tutorial/install-backup-agent-on-osx/
[16:12:34] <ells> even the help links in teh MMS console are broken
[16:41:05] <feathersanddown> in morphia, when using references (https://github.com/mongodb/morphia/wiki/ReferenceAnnotation) when load a document that have a reference to another, it load both in same call?
[16:59:10] <culthero> Quick question; I have 3 shards. My first shard is is running between 50-100% cpu utilization, shards 2 and 3 are running at 2-2.5%. Doing about 60-100 inserts a second. Why is this?
[16:59:24] <culthero> all 3 config servers themselves have low CPU utilization
[16:59:55] <culthero> Data is evenly distributed between the 3 shards
[17:07:57] <culthero> skot: i literally just realized that one table I query is only on the first shard. Can I just sh.shardCollection("offending_collection"); ?
[17:08:16] <skot> culthero: you need to select a shard key
[17:10:59] <skot> k, I'd suggest choosing a shard key used in all the queries, so it spreads the queries aprop.
[17:11:49] <skot> Cause if you don't choose a shard key like that then it will just query all shards which might not help, depending on your usage pattern.
[17:17:12] <culthero> skot: hm, ok, I will have to think about that
[17:23:31] <culthero> Right now I am i/o bound on searching a 30-40gb fulltext index
[17:24:15] <culthero> like, if I search for something that is contained in more then 10-20% then half the documents.. its.. well very slow
[17:24:36] <culthero> maybe it's because I shouldn't be fulltext indexing tweets
[17:25:46] <culthero> all the drives are SSD's, just not SSD's in raid 0 with 10~ drives
[17:34:29] <tjbiddle> Hey all - just curious. I decided to check mongostat on a system I've recently started working on. How many insertions per second is considered small/average/large for mongodb?
[17:38:16] <culthero> I have had no problem doing 60-100 inserts per second.
[18:07:04] <tjbiddle> culthero: Yeah I'm sitting at ~1000 inserts/second on one of the machines I'm working on. Just curious how that compares to other production instances. Whether that's considered a lot or little, or what
[18:30:18] <wayne> is there an ObjectId value that means "null"?
[18:30:55] <wayne> i'm using mgo and go's type system is not happy with nil as bson.ObjectId (inherently a string)
[18:45:36] <jrdn> question!!!! anyone have to deal with HIPAA compliance with mongo?
[20:24:26] <dgarstang> feathersanddown: i don't think that's it
[20:25:29] <feathersanddown> recently I've installed in a windows machine and is fine
[20:26:12] <dgarstang> feathersanddown: this just happened on 3 shard nodes I installed indepdnantly. happened on all 3
[20:27:46] <feathersanddown> uhm.... then don't know, sharding is advanced for me :(
[20:29:05] <dgarstang> the docs on auth are pretty rotten
[20:55:58] <dgarstang> I need some help still with mongo auth
[20:57:49] <dgarstang> ARGH! "not authorized for query on local.system.replset"
[21:07:35] <dgarstang> I need some help still with mongo auth
[21:09:33] <dgarstang> I need some help still with mongo auth
[21:18:05] <dgarstang> I need some help still with mongo auth
[21:22:38] <dgarstang> I need some help still with mongo auth
[21:24:11] <dgarstang> Why woudl I get this? "Database command 'listDatabases' failed: not authorized on admin to execute command { listDatabases: 1 }"
[21:50:42] <MongoNewb> quick question, when I do a find(), how do I see how many documents were returned from it (in PyMongo) if anyone knows?
[21:50:49] <MongoNewb> can I do .count() in PyMongo?
[21:51:22] <MongoNewb> nevermind silly, I tested it
[21:51:30] <MongoNewb> I didnt think how to do it but once I asked I thought that woudl be it