PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 1st of January, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[01:07:05] <jeremy-> Does pymongo have stuff like $exists , $and in the documentation
[01:12:12] <_aegis_> jeremy-: just put quotes around them
[01:13:19] <jeremy-> I was having quite a lot of problems trying to get my syntax out, just realised i should create a bunch of test cases which im going through now
[01:18:51] <jeremy-> I've created my test case as: col.update({"fieldname" : {"$exists" : False}}, { "$set" : {{"fieldname" : "newvalue"}}})
[01:19:20] <jeremy-> err, double curly, how did i check it 5 times and only see it now
[01:20:03] <_aegis_> :D
[01:20:12] <_aegis_> that shouldn't be valid python
[01:20:33] <_aegis_> I suggest using a linter in your editor
[01:21:49] <jeremy-> I removed the double curlys on the $set and it seemed to work
[01:21:57] <jeremy-> linter? i'll look into that
[01:22:04] <jeremy-> i just installed pydev on eclipse
[01:22:47] <_aegis_> eclipse D:
[01:22:58] <jeremy-> what do people develop python in?
[01:23:03] <jeremy-> I'm open for suggestions
[01:23:06] <LesTR> vim
[01:23:09] <LesTR> all time
[01:23:11] <LesTR> : )
[01:23:16] <LesTR> HNY!
[01:23:37] <jeremy-> I used vim initially, i like the file management stuff with eclipse, easy to switch between stuff, maybe i just dont know how to use vim properly
[01:23:50] <jeremy-> I used samba to share to a windows box and i develop on my eclipse as of a few weeks ago
[01:25:26] <LesTR> its all about first moment, when u take a time (maybe week) to vim, all editor can be pease of shit (and now i stopped here) Let's go to party guys
[01:26:57] <_aegis_> I recommend sublime text ;)
[01:27:27] <jeremy-> Well i dont presume to know much about anything so I'll give them a look over again
[01:32:51] <jeremy-> Is it possible that you just cant check against $exists False (it only allows $exists True)
[01:33:13] <jeremy-> Because my syntax is going through by the update is still happening even if my only update query is against $exists False
[01:33:22] <jeremy-> by = but*
[01:34:42] <jeremy-> Am i supposed to use $not $exists True
[01:36:37] <jeremy-> col.update({"fieldname" : {"$exists" : False}}, { "$set" : {"fieldname" : "value that is conditional to exists False"}})
[02:07:23] <jeremy-> I know ive been draining this channel but I cant understand why my pymongo syntax is accepted yet it does unexpected things
[02:07:53] <jeremy-> For instance, i gaveup on using $exists, tried $nin (an list of potential values)
[02:08:04] <jeremy-> db.log.update( {"date" : ISODate("2013-01-04T00:00:00.0Z"), "fieldtest" : {$nin : [1, 2, 3]}}, { $set : {"fieldtest" : "field value updated if not in 1,2,3"}})
[02:08:29] <jeremy-> Works fine in console, try the same thing in python with a correct datetime object which i know converts to bson date, and simply change "set" and "nin" to have quotes
[02:08:32] <jeremy-> stops working
[02:09:01] <jeremy-> It just ignores the query and updates the field regardless of whether "$in" or "$nin"
[02:14:54] <jeremy-> OMG finally, i ripped out the pymongo code into a new file and it works, so its gotta be something to do with initialising the mongoclient connection (maybe twice), causing a bug
[02:15:03] <jeremy-> Almost ripped out my hair in frustration :D
[14:16:36] <Zelest> Anyone happen to use GridFS and know of any program/module to mount it on a regular Linux distro?
[14:17:01] <Zelest> E.g, mount -t gridfs mongo://localhost/db /mount/point
[14:17:07] <Zelest> or something
[14:26:24] <Hilli> Zelest: Haven't tried it, but you should probably be looking for a combination of Fuse and GridFS: https://github.com/mikejs/gridfs-fuse
[14:26:41] <irakli> why mongodb aggregation framework doesn't support $within in $match and geospatial stuff?
[15:11:50] <mahoski> I have duplicate documents in a collection and want to remove them. The collection looks like: [{_id: 1, name: 'bob'}, {_id: 2, name: 'bob'}, {_id: 3, name: 'sue'}, {_id: 4, name: 'sue'}]. There are no dependencies thus all I care about is having one 'bob', one 'sue' etc. How is this done (from the mongo shell)? I am familiar the operators reference page. Collection size is 17k documents, 2k of which are dupes. Aside: I am usi
[15:11:50] <mahoski> ng Meteor.
[15:17:26] <wereHamster> mahoski: find({name:'bob'}) and then remove all but one
[15:19:47] <irakli> why mongodb aggregation framework doesn't support $within in $match and geospatial stuff?
[15:23:00] <mahoski> wereHamster: problem i have there is, i don't know all the duplicate values. of the 2k dupes, only 1 is 'bob'.
[15:26:37] <mahoski> oh wait, i should just do a distinct, and then loop through ... think i have it.
[15:37:45] <colun> to avoid duplicate, you can use unique indexes : http://docs.mongodb.org/manual/core/indexes/#index-type-unique
[15:45:27] <mahoski> yes but i am using minimongo. going forward i will check count on each insert, to ensure uniques
[15:46:01] <mahoski> my issue is resolved, thanks wereHamster and colun for your help
[15:46:15] <ron> wtf is minimongo?
[15:46:29] <ron> oh, nevermind.
[15:47:21] <colun> ron: https://github.com/slacy/minimongo#readme
[15:47:37] <ron> colun: yes, I can google. hence, the nevermind.
[15:47:40] <ron> but thanks :)
[17:14:08] <praeconium> Hey guys, I have a small frontend q. I've got a bootstrap template up via node.js and connect package, connected to my mongodb. I am able to query it, but can anyone guide me how to proceed in order to present queries in frontend?
[17:15:25] <praeconium> I connect to mongodb via mongojs
[18:07:14] <Zelest> Hilli, Aah, cheers!
[19:25:07] <timeturner> can I deselect subdocument properties in a query?
[21:44:09] <pietia> is it possible to use gridfs documents as as embedded documents (in some other document…) ?
[22:13:52] <pietia> anyone ?^
[22:14:12] <dingo2> yep
[22:23:22] <pietia> dingo2: k. do you have exp. with gridfs ? I'm wondering it it's possible to store gridfs documents as an embedded documents ?
[23:57:08] <nicksloan> hey Derick, how are things?