[00:36:26] <tanner> is there a way to do a two node replica set without an arbiter?
[00:52:30] <cyberfart> I was doing some testing with 2.0.0 32Bit and went over the storage limit. The problem is, now I can't do much with it except find queries. Is that normal? I can't even drop a database
[01:03:30] <tystr> when using the query option with map reduce, does it just issue that query? i.e. will indexes be used for that query?
[01:10:06] <WormDrink> anybody using mongodb with data=journal on ext{3,4} ?
[02:44:19] <JoeyJoeJo> How can I return just one field in a find?
[03:40:55] <JoeyJoeJo> Is it possible to have a collection of collections?
[07:00:13] <ndee> hi there, is following possible: I have a collection and would like to search for a document. The more criterias match, the higher should the documents "rank". Is that directly possible or would I need a programatical way to do that?
[07:01:34] <NodeX> that's an application side problem
[07:01:36] <wereHamster> ndee: you can map/reduce and then search in the resulting collection
[09:12:34] <[AD]Turbo> is it possible to user .sort(...) on a findOne query? I tried db.ExchangesSell.findOne({ 'price': { $gte: 2 } }).sort({ 'price': 1 }) in the mongo shell, but received an error (Tue Jul 3 11:09:21 TypeError: db.ExchangesSell.findOne({price:{$gte:2}}).sort is not a function (shell):1)
[09:15:59] <neil__g> probably have to do a find().sort().limit(1)
[10:46:26] <rs_> Hi all, does anyone translate strings / database content using mongodb? ...and if so, can they share the process they used for storing the translations and calling those translations?
[10:49:19] <neil__g> i'd have a collection per language
[10:54:52] <rs_> Based on creating a new collection per language, how would I fallback to 'en' if a certain translation didn't exist?
[10:55:00] <neil__g> i suppose @NodeX's way would make it easier to add new strings
[10:55:09] <neil__g> with my route you'd have to add an entry to multiple collections
[10:55:16] <wereHamster> rs_: not a mongodb question
[10:56:27] <NodeX> rs_ : despite not being a mongo question you can do it like this... (on a per word basis like I suggested) ... in your app use !empty(lang) else en
[10:56:36] <neil__g> Can anyone give me a practical reason why not to store prices as floats in mongo? My boss person wants me to store them as integers (cents)
[10:56:54] <NodeX> neil__g : there is no practical reason!
[11:12:26] <NodeX> I wonder if the UK government are going to use MongoDB to store all this new "snooping" data they are about to amass from it's citizens
[11:13:01] <NodeX> every phone call, email, website, search all stored for 1 year .. that's alot of data
[11:21:10] <Derick> ryan__: it's just processing that will be a pain
[11:21:34] <NodeX> your (int) will allways need extra processing if you store as Int's
[11:21:57] <ryan__> I get that I may need to store the position of the decimal place and format the number when it's read out, but is there anything else I need to consider?
[11:36:17] <ryan__> Why are the drawbacks on this page seen as 'severe' ? http://www.floating-point-gui.de/formats/integer/
[11:38:39] <adamcom> @W0rmDrink - what's the value? (minor doesn't really matter, since it just indicates splits)
[11:39:23] <W0rmDrink> adamcom, when queried via mongos it is: { "version" : { "t" : 1105000, "i" : 5 }, "ok" : 1 }
[11:39:57] <adamcom> right - so if "i" differs, that's fine
[11:40:20] <W0rmDrink> but when queried via shard members it is only that for like 2 shards - for other shard for example - its - { "configServer" : "hxcsvc-a01:27019,hxcsvc-a02:27019,hxcsvc-b01:27019", "global" : { "t" : 1097000, "i" : 0 }, "mine" : { "t" : 0, "i" : 0 }, "ok" : 1 }
[11:41:06] <adamcom> ah, OK, so it probably just hasn't done a migrate/split that caused it to update the local version
[11:41:14] <adamcom> once it does, it should come up to speed
[11:41:29] <adamcom> the shards themselves don't really need to be in sync (the mongos does)
[11:41:36] <W0rmDrink> no - but look at global version - lgobal version does not match
[11:41:54] <adamcom> global version is the last version it saw when it pinged the config server
[11:42:13] <adamcom> trying to think of an easy way to refresh that…….hmmm
[11:43:09] <W0rmDrink> see - my concern is - I keep getting errors like this on and off: Assertion: 13388:[asyncad.pending] shard version not ok in Client::Context: client in sharded mode, but doesn't have version set for this collection: asyncad.pe
[11:43:59] <W0rmDrink> and when that msg comes up client gets error: { ok: 0.0, errmsg: "Tried 5 times without success to get count for asyncad.pending from all shards" }
[11:44:25] <adamcom> have you tried fluhing the config on the mongos?
[11:44:52] <W0rmDrink> well I did - it seemes to have gotten rid of the error msg - but ehrm - the version missmatch is still there
[11:45:39] <W0rmDrink> or the version missmatch in output of getShardVersion
[11:45:41] <adamcom> right, but the only place the version matters is on the mongos - it only matters for the shard members when they are doing migrations and splits
[12:07:39] <W0rmDrink> how safe is it to always run with balancer disabled ?
[12:07:48] <W0rmDrink> cos it seems my balancer has been disabled since 05-07
[12:07:57] <W0rmDrink> and I read that then client wont ping config server
[12:08:11] <W0rmDrink> and will this result in errors like this : shard version not ok in Client::Context: client in sharded mode, but doesn't have version set for this collection: ...
[12:17:13] <adamcom> that can be caused by various things, are you running a map/reduce when you get it? - the only workaround, besides an upgrade, would be to run flushRouterConfig before each M/R kicks off
[12:18:43] <adamcom> some of the relevant pieces: https://jira.mongodb.org/browse/SERVER-4387 https://jira.mongodb.org/browse/SERVER-4262 https://jira.mongodb.org/browse/SERVER-4185 https://jira.mongodb.org/browse/SERVER-4185
[12:45:11] <devastor> Hi all, I got some "DR102 too much data written uncommitted" warnings and backtraces after initial sync in 2.0.4 when it was doing the replSet initialSyncOplogApplication stuff. It continued and completed ok after those, though. Is there a risk that some data didn't get written properly or anything like that?
[13:17:08] <JoeyJoeJo> I have an array of arrays that I want to store in mongo using pymongo. How can I do that?
[13:17:34] <Derick> just store it like a normal document... mongodb supports nested arrays
[13:18:05] <ron> it supports storing nested arrays. querying and modifying nested arrays is a bit limited though. unfortunately.
[14:29:37] <kristuttle> I am stumped by "call to member function insert() on a non-object" from my PHP code when I try and operate on my mongoDB. I check PHP info and the driver is there, the connection to mongolab seems to work. I am copying the code right from the tutorial as in $obj = array ("name" => "foo"); and then $collection->insert($obj);
[14:30:27] <NodeX> you probably have not initialised the $collection
[14:32:42] <kristuttle> Actually I think I may have found the error.
[14:34:29] <kristuttle> Whew. Took me 30 minutes of looking everywhere and it turned out that I had a "dp" in one place instead of "db". Sorry to have taken up IRC oxygen on that one. Back to work...
[16:08:02] <kali> Vile: iirc, it works in that direction and that direction only
[16:08:28] <kali> Vile: look for 2.0 releases and productions notes
[16:28:24] <adamcom> Vile: also, don't run it that way for a long time - as part of an upgrade process, sure, but not for extended use
[16:48:23] <JoeyJoeJo> I have a field that contains floats. Can I easily find all documents where this field has less than 2 decimal places? ie return if field = 1.1 but not if field = 1.11
[16:48:58] <NodeX> well you can regex it I suppose
[17:10:54] <UnSleep> mmm does necesary to use reduce function when i only want to select a nombre of rows without group them?
[17:12:28] <UnSleep> i only want to select row that are this.a > this.b + this.c
[17:20:29] <UnSleep> if i "emit" only the rows i want will been shown in the result? map is done in each row in the collection?
[17:32:23] <mediocretes> I'm a little concerned about setting op_timeout in the mongo ruby driver. Is there a chance that I could get results from a timed out query? Is that something I need to protect against?
[17:49:38] <dstorrs> the backups docs say that you can back up "a small cluster" via mongos. Can someone suggest good limits for "small" ?
[18:24:38] <niemeyer> dstorrs: I don't think MongoDB itself has a lot to do with those limits in that scenario
[18:25:01] <niemeyer> dstorrs: The limits will be imposed by your time/disk/network/memory constraints
[18:27:23] <dstorrs> niemeyer: fair enough. I'm just trying to get a sense of what to expect.
[18:28:24] <niemeyer> dstorrs: Yeah, sorry, I understand you're trying to get more details for your use case, and I'm not helping much, but the real answer is really "it depends", which sucks a bit as an answer.
[18:42:33] <niemeyer> multiHYP: The advantage would be in using something native to the database that changed documents atomically, but I don't think such an operator exists
[18:44:13] <dstorrs> well, there's update(), with $push and $pull to add / remove keys
[18:44:23] <dstorrs> but I don't think it will quite fit here
[18:45:11] <dstorrs> I'm not sure it would be valid to update the item you are currently iterating over.
[18:47:45] <multiHYP> no it'd be a 2 pass operation
[18:59:32] <multiHYP> dstorrs: very powerful. and i thought the only automation possible was mapreduce :)
[19:00:00] <multiHYP> why can't i just by words in mongo shell?
[19:05:49] <multiHYP> oh i need to $pull and $push at least once for every element of the array.
[19:06:06] <multiHYP> cannot just fiddle with fields without pulling them.
[19:07:26] <blazento> Hi, I'm trying to query for items with a key existing, the only problem is some of these keys appear to have spaces and / or dots... {'named_entities.flat.Charlie Sheen' : {$exists:true}}... is there any way to work with these spaces?
[19:10:00] <dstorrs> would you take it horribly remiss if I pasted a link to the docs followed by those four little upper-case letters we all know and love so well?
[19:12:39] <dmansen> i have a question about geo queries - i've noticed that my 2d indexes will only be used if my geo query isn't part of a compound expression (like inside an $and)
[20:20:47] <W0rmDrink> yeah this is just insane - I keep getting Wed Jul 4 01:04:08 [conn2450] Assertion: 13388:[asyncad.pending] shard version not ok in Client::Context: client in sharded mode, but doesn't have version set for this collection: asyncad.pending myVersion: 1|0
[20:21:02] <W0rmDrink> if I flush router config its ok for a short while - then it starts again
[20:27:05] <nemosupremo> Are there any steps I should take before I create a replica set out of an existing server?
[20:47:22] <tanner> can mongodb be reconfigured live, by that I mean, can I add a server to a replica set without bringing it down and or restarting the service?
[21:20:07] <tanner> kali: can you perform a reconfigure that way as well?
[21:34:58] <kali> tanner: you can dur about everything this way, but some shortcuts are not there... http://www.mongodb.org/display/DOCS/Scripting+the+shell
[22:04:32] <lsm-lpt> can i pipe a query to the mongo command line client on stdin and get query results on standard out?
[22:05:52] <lsm-lpt> mongo server/db -eval'[query]' doesn't seem to support stdin