PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 28th of July, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[01:17:52] <oklada> i'm traveling overseas (canada from the us) and can't connect to mongolab; i can't even ping the server. is this b/c of my location?
[01:20:27] <cheeser> doubtful
[01:20:54] <cheeser> mongolab.com?
[09:20:17] <kali> overseas ? :)
[11:22:46] <PiPo> hi
[11:23:18] <thik> hi
[11:31:25] <NaN> with the PHP driver, why when I try to get a value (0.000078) I get 7.8E-5 ?
[11:31:45] <NaN> the same query works in mongoshell
[11:33:10] <ron> Nodex, Derick: ^
[11:35:21] <ron> and also, BATMAN!
[11:38:21] <kali> NaN: what's wrong there ?
[11:38:36] <ron> BATMAN!
[11:38:41] <ron> okay, I gotta stop that.
[11:38:50] <Derick> NaN: it's the same number
[11:39:02] <Derick> how are you trying to output it?
[11:39:16] <ron> oh, damn, stupid me. it really is the same number. must read better.
[11:39:53] <NaN> Derick: floatval($field);
[11:40:13] <Derick> o_O
[11:40:16] <NaN> ron: then I'm double stupid? hehe
[11:40:33] <Derick> i've never seen anybody use floatval really
[11:40:34] <ron> NaN: well, your nick is.. BATMAN!
[11:41:20] <NaN> ron: batman...?
[11:41:28] <NaN> Derick: same result with (float)
[11:41:40] <Derick> NaN: yes, I still don't see your point
[11:41:42] <Derick> it's correct
[11:41:56] <ron> NaN: http://kishcom.com/coding/batman-javascript-error/
[11:43:29] <ron> NaN: and for extra clarity - http://youtu.be/EtoMN_xi-AM
[11:46:56] <NaN> ron: funny... but what about this > http://youtu.be/eDdI7GhZSQA
[11:47:46] <NaN> Derick: ok the thing is that I need to investigate how to format that number
[12:23:17] <thik> hi
[12:23:35] <thik> can i use $elemMatch inside $project
[13:14:40] <Avish> Hi all. Do I understand correctly that using Insert with a batch of documents and ContinueOnError set to true would be the equivalent of INSERT IGNORE in e.g. MySQL? i.e. that all documents in the batch that do not violate a unique index would get inserted?
[13:50:34] <zoek1> Avish: yes, it's similar and you if the bulk insert generate error you an retrive it with getLastError command
[13:50:37] <zoek1> http://docs.mongodb.org/manual/release-notes/2.0/#new-continueonerror-option-for-bulk-insert
[13:51:14] <LesTR> Avish: I have same opinion (we testing this in this week)
[13:52:52] <Avish> well I'm using continueOnError and ignoring DuplicateKeyException (I'm on Java, if that matters) but for some reason only some of the documents make it through, although the collection was empty before the insert. Anyone seen something like this?
[14:04:23] <zoek1> Avish: can you provide the code or the documents?
[14:05:52] <ron> Aha! Delvr!
[14:07:33] <Avish> zoek1: I'll run some further tests to verify the problem is not on my side and post a gist if needed
[14:08:02] <Avish> ron: ?
[14:08:15] <ron> nothing. I just stalk people online.
[14:08:16] <ron> :)
[14:08:29] <zoek1> Avish: Ok
[14:17:29] <LesTR> Avish: that's very crazy idea, please check your code and send bugreport (if its needed)
[14:18:26] <Avish> ron, you'll have to explain yourself a bit better... do we know each other?
[14:19:00] <Avish> zoek1, lesTR: the problem was on my side, false alarm.
[14:19:10] <ron> Avish: nope. never met. but apparently, we do know at least one person in person. not that it matters. ignore me now :)
[14:20:10] <Avish> no, I'm intrigued. Who do we know in common?
[14:20:47] <ron> Umm, I'd rather not go into that, especially not in a logged channel :)
[14:25:46] <ZeroRomero> guys, I have a weird problem, I can no loger query array field if it has more than 3 elements (so it seems), checked everything, upgraded mongo, restored db, nothing works
[14:25:54] <ZeroRomero> anyone has any ideas?
[14:26:22] <ZeroRomero> I'm on windows BTW
[14:28:04] <Avish> ZeroRomero: can you elaborate?
[14:29:28] <ZeroRomero> I think I did =) I have tags field with about 50 elements in it, when i query it with $all, records with many tags are not returned, only those that have 1-3 tags
[14:29:39] <ZeroRomero> tags are alpha with dots
[14:30:34] <ZeroRomero> it seems to be working with about 20 until last night when I added more tags to records and now it works no more
[14:30:46] <ZeroRomero> triple checked data, it seems to be fine
[14:31:58] <ZeroRomero> BTW I'm quering with single element, this is damn weird
[14:33:02] <LesTR> hmm, i have same usecase and works as well
[14:34:11] <LesTR> but i never try run mongo on windows
[14:40:04] <kali> ZeroRomero: got to the mongodb shell, show use one doc, and the query that fails to find it
[14:42:06] <ZeroRomero> nevermind, I am an idiot
[14:42:48] <ZeroRomero> I was removing some tags in postprocessing but didn't regenerate keys
[14:43:57] <ZeroRomero> essentially I had dictionary instead of list
[14:47:32] <ZeroRomero> all working, sorry about that =)
[14:52:33] <LesTR> : )
[18:44:07] <pingboy> anyone on that could help me figure out why just doing a simple collection.update on a document throws an error: NoMethodError: undefined method `keys' for #<User:0x4be15994 @username="blahblah">
[18:44:32] <pingboy> doesn't matter if the document exists in the db or not
[18:46:56] <kali> is that mongoid ?
[18:49:07] <pingboy> not using mongoid or mongo mapper
[18:49:09] <pingboy> just raw mongo ruby driver
[18:50:39] <pingboy> i'm guessing it's a type issue... the mongo ruby driver needs to think it's a mongo document or osmething.. this is jruby btw
[18:51:55] <pingboy> yeah looking at the driver, that's my problem.
[18:52:08] <pingboy> it needs to be a mongo document .. it calls .keys on the document passed in to update
[18:52:13] <pingboy> hrm...
[18:52:50] <pingboy> or a hash..
[18:54:34] <pingboy> yeah that's it. think i answered my own question heeheh.
[18:54:35] <pingboy> sorry to bug
[18:56:27] <pingboy> kickass. working like a charm
[18:56:34] <pingboy> thanks man
[19:00:49] <kali> great.
[20:18:04] <mechastorm> anyone have an idea why Mongo would not be able to write to the journal file eventhough the db directory has been given 777 permission?
[20:18:22] <mechastorm> on an Ubuntu 12.04
[20:18:29] <mechastorm> with the 10-gen installed version of mongo
[21:56:26] <NaN> is it possible to do a query to get only the document with more date? example > http://pastie.org/private/fne80eq722zdn5nirnuyg < get only the second doc
[21:56:33] <NaN> *data
[22:12:35] <outcoldman> NaN, do you know all fields you want to get? you can use $exists for this.
[22:13:17] <outcoldman> NaN, MondoDB does not have function which can tell you the number of fields in document. If you really need it - it is better to keep it precalculated.
[22:13:44] <cheeser> you could probably use an M/R job to count the fields and return the one with most
[22:13:51] <MaddinXx_> hi there. I'm compiling Mongo from source as I need SSL support ... but I highly guess I'm going something more than wrong. It already took like 15GB ... where final packages (Debian etc.) are only some MB....what am I missing? :)
[22:18:37] <NaN> outcoldman: I can know it, so I'll better use another collection to track it
[22:18:42] <NaN> cheeser: what's an M/R job?
[22:18:56] <cheeser> map reduce
[22:19:25] <NaN> any read about that?
[22:19:50] <cheeser> http://docs.mongodb.org/manual/core/map-reduce/
[22:20:02] <NaN> thanks cheeser :)
[22:20:08] <cheeser> any time
[22:28:27] <MaddinXx_> no one?
[23:13:56] <tpayne> Hello. I have a collection defined as (id, list, commonId).. . I'd like to make it so that the combination of id & list is a unique key, how do i do this?
[23:16:26] <cheeser> db.collection.insert({ _id : { id : ..., list: ...}, ...})
[23:16:39] <cheeser> or something to that effect
[23:19:10] <tpayne> ...
[23:20:15] <whaley> tpayne: though it means adding an index, you can you do db.collection.ensureIndex({"_id":1,"list":1},{"unique":1})
[23:20:48] <tpayne> whaley: is there no other way than adding an index?
[23:20:55] <tpayne> what about at the update level?
[23:21:02] <tpayne> i'm using update with upsert = true
[23:21:18] <tpayne> perhaps i can set conditions that don't upset if the values are the same
[23:22:01] <cheeser> oh, a unique key. i'd read that as the id of the collection.
[23:22:28] <whaley> tpayne: I don't believe you can do it without specifying an index
[23:23:09] <tpayne> ok thanks
[23:23:31] <cheeser> correct.
[23:24:34] <whaley> also, I meant to specify "id" as the key name there and not "_id" in my ensureIndex example… as _id has uniqueness enforced on it implicitly
[23:33:21] <tpayne> coll.ensureIndex(MongoDBObject("id" -> 1, "list" -> 1), "id_list_unique_index", true)
[23:33:28] <tpayne> this is what i have for casbah for scala
[23:33:39] <tpayne> and it compiles, going to test it when my other code compiles..
[23:33:43] <tpayne> but i don't know what the 1's mean