<  February 2017   >
Su Mo Tu We Th Fr Sa  
          1  2  3  4  
 5  6  7  8  9 10 11  
12 13 14 15 16 17 18  
19 20 21 22 23 24 25  
26 27 28
00:04 versigtig joined
00:22 kyuwonchoi joined
00:36 silenced joined
00:48 Jonno_FTW joined
01:09 JonathanMcClare joined
01:10 e01 joined
01:10 e01 joined
01:51 pticochon2 joined
01:54 Sasazuka joined
01:56 philipballew joined
02:00 wartdev joined
02:03 JonathanMcClare joined
02:04 Waheedi joined
02:05 Sasazuka joined
02:11 e01 joined
02:11 e01 joined
02:13 <baggar11> Anyone familiar with mongoexport here? Trying to export via datetime from the following dataset --> "datetime" : ISODate("2016-06-02T02:32:27Z")
02:16 <baggar11> I'm trying variations of the following which always export 0 records --> mongoexport --db database1 --collection collection1 --query '{ "datetime" : { $gte : { $ISODate : "2017-01-01'T'00:00:00'Z'}}}
02:26 kexmex joined
02:34 JonathanMcClare joined
02:59 <joannac> baggar11: http://stackoverflow.com/questions/14758605/mongoexport-using-gt-and-lt-constraints-on-a-date-range
02:59 <gitgud> does anyone know if .count() call the whole working set into question to get the number of docs?
03:02 <gitgud> checking my old logs it seems freethejazz made an answer
03:11 realisation joined
03:12 e01 joined
03:14 <baggar11> joannac: when I restructure the command to the following as suggested in the link, it still exports 0 records. --> mongoexport --db database1 --collection collection1 --query '{"datetime":{$gt:new Date(1483228800000)}}' --out test.json
03:14 <baggar11> joannac: any other hints?
03:24 <joannac> if you run the same query in the shell, do you get results?
03:24 <joannac> baggar11: ^^
03:28 <joannac> baggar11: I just tested with some random data and it works for me. Pastebin your mongoexport and the output from doing the same query in the mongo shell
03:29 <baggar11> joannac: if I run this, I get results --> db.database1.find( { "datetime" : {"$gte" : ISODate("2017-01-01T00:00:00Z")}})
03:29 <joannac> baggar11: I think you should double check the collection name you give mongoexport then
03:30 mexiwithacan joined
03:30 <joannac> you're querying on a collection called database1 in the shell
03:30 orbyt_ joined
03:35 realisation joined
03:43 _yoy_ joined
03:44 YoY_ joined
03:54 Guest95 joined
04:02 edrocks joined
04:04 Derperperd joined
04:13 e01 joined
04:13 e01 joined
04:35 kyuwonchoi joined
05:03 philipballew joined
05:05 mexiwithacan joined
05:09 philipballew joined
05:14 e01 joined
05:14 philipballew joined
05:17 Siegfried joined
05:19 philipballew joined
05:37 preludedrew joined
06:04 edrocks joined
06:06 lpin joined
06:11 kashike joined
06:11 ArchNoob joined
06:14 e01 joined
06:14 e01 joined
06:28 blizzow joined
06:32 castlelore joined
06:32 castlelore joined
06:32 <ArchNoob> Hi, how can i restore my database state after i've made a bad update param?
06:33 <ArchNoob> *restore my database to a previous state.
06:49 mexiwithacan joined
07:04 scoutzzzz joined
07:15 e01 joined
07:17 evil_gordita joined
07:45 coalado joined
07:47 yeitijem joined
07:52 <coalado> when I want to sum up all values of doc.fieldA where fieldB=*, I can use $group
07:53 <coalado> But I'd like to sum up all fields where fieldB=ValueA OR fieldB=ValueB
08:06 edrocks joined
08:11 <gitgud> coalado, try $cond
08:11 <gitgud> u can use $cond with $eq in $project
08:11 <gitgud> then in $group stage do the summing up
08:12 <gitgud> (not sure if this is optimal btw)
08:19 scoutzzzz joined
08:19 Derperperd joined
08:24 VeeWee joined
08:27 preludedrew joined
08:28 Mia joined
08:28 Mia joined
08:31 scoutzzzz joined
08:32 samwierema joined
08:36 FatNoLife joined
08:37 gfidente joined
08:48 kyuwonchoi joined
08:55 OneMan joined
09:11 scristian joined
09:14 ArchNoob joined
09:19 kyuwonchoi joined
09:29 jojo__ joined
09:31 elherp joined
09:37 Tad3j joined
09:37 <elherp> hhemp
09:38 <elherp> hello
10:11 jrmg joined
10:17 Jimu joined
10:19 <Jimu> How is MongoDB more scalable than something like PostgreSQL? I worked on a project in which PostgreSQL performed far better than MongoDB
10:20 Derperperd joined
10:20 <Jimu> I'm not judging, I'm just confused
10:25 <kali> it's not necesarily as true today as it were a few years ago, but the strong transactional principles in SQL are getting in the way of performance (basically, they require to manage locks and so limit concurrency). this gets even worse when your database and your load get too big for one single machine
10:26 <kali> so part of the nosql movement was to relax the strong transactional constraints of sql system to get more scalable systes
10:26 <kali> +m
10:28 <Jimu> kali: great explanation
10:29 <Jimu> kali: do you think sharding in SQL levels the playing field?
10:32 mexiwithacan joined
10:36 <kali> Jimu: i think it's kind of kludgy, because that's not what SQL was designed for. but it enables to extend the scope of what SQL can do for sure
10:38 <Jimu> kali, I had a bad experience with MongoDB. It could only handle 1000 inserts at a time, and for 1million it took something like 30-60 seconds
10:42 <kali> Jimu: well, you only have problems with the technologies you're using :)
10:42 <Jimu> lol
10:44 mexiwithacan joined
10:49 jrmg joined
10:50 StephenLynx joined
11:13 SkipperMix joined
11:14 SkipperMix left
11:14 Mech0z joined
11:15 <Mech0z> With the c# driver, if I want to add to a list in a collection, I would do update.Push(s => s.Votes, "username"); , how would I remove from that list?
11:16 <Mech0z> would pull work?
11:23 kyuwonchoi joined
11:25 mexiwithacan joined
11:26 silenced joined
11:47 klics joined
12:06 RickDeckard joined
12:08 edrocks joined
12:14 coalado joined
12:16 harry1 joined
12:16 scoutzzzz joined
12:20 itaipu joined
12:21 Derperperd joined
12:30 re1 joined
12:34 diegows joined
12:34 jwd joined
12:36 jrmg joined
12:40 scoutzzzz_ joined
12:41 kexmex joined
12:51 rodmar_ joined
12:52 YoY joined
13:00 geoffb joined
13:03 jrmg1 joined
13:04 Derperperd joined
13:05 blizzow joined
13:07 marianogg9 joined
13:08 ArchNoob joined
13:14 jrmg joined
13:22 gentunian joined
13:24 kyuwonchoi joined
13:28 re1_ joined
13:31 edrocks joined
13:47 itaipu joined
13:50 artok_ joined
14:01 sterns joined
14:08 griffindy joined
14:10 ramortegui joined
14:13 VeeWee joined
14:22 artok_ left
14:23 artok joined
14:48 Guest95 joined
14:54 heroux joined
14:57 kexmex joined
15:04 marianogg9 left
15:06 silenced joined
15:06 jrmg joined
15:14 heroux joined
15:15 rendar joined
15:25 kyuwonchoi joined
15:25 silenced joined
15:28 itaipu joined
15:30 JonathanMcClare joined
15:31 necrogami_ joined
15:39 realisation joined
15:45 Derperperd joined
15:51 edrocks joined
15:54 philipballew joined
15:56 ArchNoob joined
16:06 Derperperd joined
16:17 coudenysj joined
16:19 silenced joined
16:23 versigtig joined
16:27 realisation joined
16:33 raspado joined
16:33 Siegfried joined
16:43 svm_invictvs joined
16:44 Guest95 joined
16:45 armyriad joined
16:47 gitgud joined
16:50 gentunian joined
16:55 edrocks joined
17:18 itaipu joined
17:25 kyuwonchoi joined
17:38 Lujeni joined
17:48 okapi joined
17:51 ramortegui joined
17:59 Siegfried joined
18:00 Kronuz joined
18:02 scoutzzzz joined
18:15 svm_invictvs joined
18:16 edrocks joined
18:17 itaipu joined
18:17 point joined
18:19 ramortegui joined
18:27 kexmex joined
18:45 silenced joined
18:47 scoutzzzz joined
19:05 slajax joined
19:10 realisation joined
19:16 d10n-work joined
19:16 dsardari joined
19:17 Sasazuka joined
19:26 kyuwonchoi joined
19:33 orbyt_ joined
19:47 sunoano1 joined
19:47 sunoano1 joined
19:49 Aven joined
19:50 jrmg joined
19:50 <Aven> hi
19:51 <Aven> I don't know if this is a simple javascript question... but for this method https://docs.mongodb.com/manual/reference/method/db.collection.insert/
19:51 <Aven> I've seen someone do this and it works insert({...},(errors,results) => {})
19:51 <Aven> how is there a callback function when the parameters don't have that???
19:52 <Aven> actually it was for insertOne
19:55 gentunian joined
20:02 slajax_ joined
20:04 <Aven> ah it's cause mongomodels is different
20:04 JonathanMcClare joined
20:05 philipballew joined
20:23 jrmg joined
20:30 StephenLynx joined
20:31 sz0 joined
20:34 gentunian joined
20:39 okapi joined
20:43 Waheedi joined
20:44 gentunian joined
20:51 felixjet joined
21:00 GitGud_ joined
21:06 raspado joined
21:06 Bodenhaltung joined
21:12 ArchNoob joined
21:14 edrocks joined
21:17 Boobie joined
21:19 <Boobie> This channel shouldn't be +s
21:19 tildes joined
21:20 <gitgud> hello yes Boobie I'm a big fan
21:20 <gitgud> nice to see you
21:20 <Celelibi> Yeah, long time no see.
21:21 <gitgud> sadly :(
21:21 <Boobie> OMG how do you guys know about me, I am mostly secret
21:23 <gitgud> Victoria's secret
21:23 <Boobie> Derick, ehershey, joannac, Number6: You should remove the +s from the channel because.. You can search for Node, you can search for Angular, you can search for React, you can search for Express, etc.. MongoDB is "exceptional" for not showing up in channel search
21:24 <Boobie> And there's no sensible reason for that.
21:24 spacecrab joined
21:25 <spacecrab> does anyone have trouble with running their apps backed by mongodb when an election occurs? i'm curious to find out if it's up to my app to handle things when an election is underway
21:25 <spacecrab> right now if i'm putting data through it and an election occurs it just hangs forever - i assumed the driver would handle it but is it the responsibility of the app? i'm trying to find documentation on it :P
21:34 slajax joined
21:51 edrocks joined
21:55 bob joined
21:59 Aven joined
22:08 Aven joined
22:17 uuanton joined
22:17 <uuanton> hi yall
22:18 <uuanton> can someone help with find query?
22:18 <uuanton> my doc looks like {
22:18 <gitgud> ask your question
22:19 realisation joined
22:19 <uuanton> my doc looks like {'primarylanguage: 'ru-ru', localization: ['locale: 'ru-ru', locale:'en-us']
22:20 <uuanton> i need to find all documents that primarylanguage and localization.0.locale not the same
22:23 <uuanton> or at least help how to google this type of question
22:26 <uuanton> gitgud do you know ?
22:27 <gitgud> no. but now that you put the question out there. someone may read this and answer it
22:27 <gitgud> however
22:28 <gitgud> uuanton, you can use aggregate framework and then use the $ne $cond in $project
22:28 <uuanton> hmm
22:29 <gitgud> uuanton, other choice you can do is look at your current collection and add a value to it
22:30 <gitgud> localPrimarySame: true for all of them that are equal
22:30 <gitgud> then search by that parameter
22:30 <gitgud> and whever you need to push objects into that collection, check for that condition and put down that param
22:30 <gitgud> and then use .find() to search using that param :)
22:31 <gitgud> so if you already have a set of docs. use the aggregate framework to find the matching docs and then use update to update all those docs to include the localPrimarySame variable
22:31 <uuanton> is $where query primarylanguage != localization.0.locale ?
22:31 <gitgud> that *could* work too but i think it would be a bit slower
22:32 <gitgud> for max efficiency best course of action is to keep track of that extra parameter and indexing that parameter
22:32 <gitgud> its just one param and storage is cheap :)
22:34 <uuanton> adding new parameter not possible in my case
22:34 <gitgud> how come?
22:35 <uuanton> db.getCollection('data').find({'$where': "primarylanguage" == "localization.0.language"})
22:36 <uuanton> Error: error: { "$err" : "Can't canonicalize query: BadValue $where got bad type", "code" : 17287 }
22:38 harry1 joined
22:41 harry1 joined
22:44 undertuga joined
22:45 <Aven> hi
22:45 <gitgud> hi
22:45 <uuanton> hi
22:46 <uuanton> in mysql SELECT * from T Where primarylanguage != localization.0.language
22:46 <Aven> im using findOneAndDelete
22:46 <Aven> my collection looks like this _id{projectId,userId}
22:47 <Aven> but if I query by doing _id:{projectId}
22:47 <Aven> it does not work... unless I include the userid...
22:48 gentunian joined
22:48 <uuanton> Aven do you try to delete document
22:49 <Aven> yes
22:49 <Aven> wait
22:49 <uuanton> if you want to delete use "remove"
22:51 <uuanton> and use same "find" query
23:00 jrmg joined
23:01 Derperperd joined
23:03 slajax joined
23:05 <Aven> why not "delete"?
23:09 <Aven> i just don't know why this filter wouldn't work { '_id': {'projectId': '58a7817c278fd544e9b82a1c' }}
23:09 <Aven> or query
23:09 <Aven> *filter
23:14 <Aven> i figured out the issue!
23:14 <Aven> *solution
23:14 <Aven> {_id.projectId : 'blahblah'}
23:16 jrmg1 joined
23:30 kyuwonchoi joined
23:32 jrmg joined
23:42 scoutzzzz joined
23:47 kexmex joined
23:53 jwd joined