<    March 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 29 30 31
00:12 Necromantic joined
00:29 <SlimmyJimmy> Can MongoDB import a jsonArray where the array objects were not separated by commans?
00:29 <SlimmyJimmy> commas and only spaces?
00:33 hayer joined
00:34 lqez joined
00:41 newwen joined
00:44 <SlimmyJimmy> The bozo of the book I'm reading drops a JSON file on me and he doesn't use commas to separate the objects
00:44 <SlimmyJimmy> It makes me wonder if he generated the JSON file from the database itself
00:45 <SlimmyJimmy> And the database created the JSON objects on their own lines, no commas, no angle brackets to signify the start/end of the array.
00:52 Sasazuka_ joined
01:14 philipballew joined
01:20 Gwayne joined
01:20 Gwayne joined
01:23 edrocks joined
01:27 cybertoast joined
01:55 Sasazuka joined
01:57 itaipu joined
02:05 lqez joined
02:14 Sasazuka joined
02:33 itaipu joined
02:46 mdorenka joined
03:15 svm_invictvs joined
03:22 gentunian joined
03:25 edrocks joined
03:56 Derperperd joined
04:01 cybertoast joined
04:26 Derperperd joined
04:31 Derperperd joined
04:49 cybertoast joined
04:50 castlelore joined
04:50 castlelore joined
04:52 chovy joined
04:52 <chovy> hi
04:53 <chovy> how can i search by $text and include all words. not any word
04:53 <chovy> for example `denzel fences` should return docs that only match both 'denzel' and 'fences' right now it is return docs that match either word.
04:56 philipballew joined
05:01 ayogi joined
05:23 preludedrew joined
05:38 orbyt_ joined
05:45 SteamWells joined
05:49 Waheedi joined
05:57 lpin joined
06:25 tildes joined
06:27 edrocks joined
06:33 <chovy> hello?
06:41 Silenced joined
06:41 Silenced joined
06:55 _jd joined
07:19 castlelore joined
07:29 yeitijem joined
07:29 Gwayne joined
07:31 akagetsu01 joined
07:35 Derperperd joined
07:38 Derperperd joined
07:40 Silenced joined
07:45 Derperperd joined
07:47 Derperperd joined
07:58 evil_gordita joined
08:03 chen joined
08:05 benlue joined
08:10 svm_invictvs joined
08:10 Lujeni joined
08:12 gfidente joined
08:29 rendar joined
08:34 benlue joined
08:36 stelarcf___ joined
08:37 Jrz joined
08:57 evil_gordita joined
09:02 ahr3n joined
09:06 Letze joined
09:09 klics joined
09:12 VeeWee joined
09:13 ahr3n joined
09:21 igniting joined
09:29 edrocks joined
09:30 itaipu joined
09:30 naf joined
10:29 Silenced joined
10:37 synchroack joined
10:38 itaipu joined
10:54 michaeldgagnon joined
11:12 Silenced joined
11:23 Silenced joined
11:39 yeitijem joined
11:52 StephenLynx joined
12:17 stelarcf___ joined
12:32 edrocks joined
12:44 gentunian joined
13:00 geoffb joined
13:18 AvianFlu joined
13:20 klics joined
13:29 edrocks joined
13:32 HermanToothrot joined
13:32 jrmg joined
13:36 RickDeckard joined
13:38 becom33 joined
13:40 <becom33> Hello . Im coming from sql background so Im having a hardtime understanding bit of nosql structure . what I want to know is lets say I have books and authors . so in mysql my idea would be to build books table and authors and table and add foreign key author_id in books to keep the relation . but in mongodb how do you do this ?
13:41 <* becom33> anyone ?
13:41 <kali> becom33: you could do it the same, really
13:42 <kali> or you could embed the books in an array in the author collection
13:42 <becom33> so if I where to get all the books written from one author . do I do two querys ?
13:43 <kali> with two collections ? you would make one query on the books collection (with an index on author_id, let's say)
13:44 <kali> if you also need the author details, you would also make a query on the author collection
13:44 <becom33> kali . yes then lets say one book can be written by two authors so then there is a many to many relationship
13:45 <kali> this is exactly why i would go for two collections in the first place
13:45 <kali> author_id would be author_ids, and be an array
13:46 <becom33> right . without having a relational table ?
13:46 <Derick> http://stackoverflow.com/a/4840089/508057 « becom33
13:46 <kali> yeah, no sad relational table in the middle :)
13:47 <becom33> awesome . thanks kali & Derick
13:49 jeffreylevesque joined
13:49 michaeldgagnon joined
14:14 ramortegui joined
14:18 cybertoast joined
14:19 harry1 joined
14:22 jr3 joined
14:30 <apoc> lets hope he _never_ needs to sort the books by some property of the authors lol
14:34 ShekharReddy joined
15:01 Derperperd joined
15:06 Derperperd joined
15:09 Derperperd joined
15:10 Derperperd joined
15:12 jrmg joined
15:16 jrmg joined
15:18 rhqq joined
15:19 RxMcDonald joined
15:19 <RxMcDonald> Anyone knows how to pull from an array in a subdocument in mongoose? I'm trying Model.findOneAndUpdate({ _id: id }, { $pull: { myArray: { $in: value } } }).then... and It's removing the whole array when it finds a value but I just need to remove a single value from the array not the whole thing
15:19 <Derick> { '$pull' : { 'myArray': 'value' } }
15:20 <Derick> would be normal mongo syntax
15:21 <RxMcDonald> alright let's try that
15:22 <RxMcDonald> yea i think it worked, thanks bro
15:33 <steffan> MongoDB create a free Atlas tier today: https://t.co/bIkd2e2ctB
15:33 re1 joined
15:33 <Derick> so we did :)
15:37 kenansulayman joined
15:39 <RxMcDonald> Derick: oh man it's not removing the value from the array : (
15:40 <RxMcDonald> I mean, the subdocument form the array of subdocuments that match the value i'm passing
15:41 <RxMcDonald> I got it like Model.findOneAndUpdate({ _id: id }, { $pull: { myArray: myValue } }, { safe: true, new: true }).then ...
15:41 <RxMcDonald> Derick: could it be because of the safe / new ?
15:42 itaipu joined
15:42 cybertoast joined
15:42 jr3 joined
15:43 <Derick> RxMcDonald: I don't know what safe and new are - can you come up with a small example using just the shell?
15:43 artok joined
15:44 <RxMcDonald> I think new returns the new document that's what i Need
15:45 <RxMcDonald> I need the new document with the subdocument removed from the subdocuments array
15:49 philipballew joined
15:51 <RxMcDonald> alright fixed it
15:51 <RxMcDonald> solution was $pull: { myArray: { key: value } }
15:56 laut joined
16:00 beauvolio joined
16:03 Bizkit joined
16:07 nanohest joined
16:07 Derperperd joined
16:09 FatNoLife joined
16:13 gentunian joined
16:14 Nicole_Pygirls joined
16:16 <Nicole_Pygirls> Hello , i need help with a query , what paste tool should use ? dont want to get banned on the channel
16:17 <Nicole_Pygirls> http://pastebin.com/xAnFvhQT
16:17 <Nicole_Pygirls> i just wnat to sum , the clicks for each hour
16:18 <Derick> can you show a sample document in a pastebin too?
16:19 <Nicole_Pygirls> Yes there is one
16:19 <Nicole_Pygirls> i mean the returned text is there under the query
16:19 <Derick> that's only output though, not input?
16:20 <Nicole_Pygirls> https://gyazo.com/d58ad7219a5dfcade8a281d651a54ab8
16:21 <Nicole_Pygirls> and this is the content of a document
16:21 <Nicole_Pygirls> https://gyazo.com/aea38d899d92f8d32ef62c15d1f99cce
16:22 <Derick> I think you will have to do this hour by hour - as you've used a value (the hour) as a key. Let me think for a second
16:22 <Derick> if you can have a copy & pasteable version of the document that'd be great
16:22 <Derick> I can't copy it from an image
16:23 <Nicole_Pygirls> yes sorry
16:23 <Nicole_Pygirls> thanks
16:23 cybertoast joined
16:24 <Nicole_Pygirls> some documents : http://pastebin.com/GeaYbUAq
16:24 <Derick> OK, let me play a little
16:24 blizzow joined
16:24 <Nicole_Pygirls> i can still modify the program to save the stats in a different way
16:24 <Nicole_Pygirls> this is demo data
16:25 jr3 joined
16:25 <Nicole_Pygirls> i was trying to do this https://mongodb-documentation.readthedocs.io/en/latest/use-cases/pre-aggregated-reports.html
16:37 <Derick> Nicole_Pygirls: sorry, took some time: https://derickrethans.nl/files/dump/af.json
16:38 <Derick> Nicole_Pygirls: note also that for the match, you don't need $and as that's the default
16:38 <Derick> (and it misses your createdAt
16:52 orbyt_ joined
16:54 <Derick> :-/
16:55 michaeldgagnon joined
16:55 synchroack joined
17:01 svm_invictvs joined
17:02 blizzow joined
17:06 coalado joined
17:07 <coalado> hi. I have 5.000.000 docs in my collection, and try to read them all. is there any fast approach?
17:07 <coalado> find() is very slow
17:15 nanohest joined
17:16 silenced joined
17:23 edrocks joined
17:25 Nicole_Pygirls joined
17:28 <Nicole_Pygirls> Back Derick sorry my internet crashed
17:29 <Derick> that's ok
17:29 <Derick> did you see my reply though?
17:30 <Derick> Nicole_Pygirls: sorry, took some time: https://derickrethans.nl/files/dump/af.json
17:30 <Nicole_Pygirls> yes was seeing it now
17:30 <Nicole_Pygirls> i appreciate it
17:31 <Nicole_Pygirls> the thing is, will have to do the same with the minutes aswell ?
17:32 <Nicole_Pygirls> there must be a way using $unwind or $project to do it on the whole array
17:32 <Derick> your original doc didn't have minutes :P
17:34 tildes joined
17:34 <Nicole_Pygirls> :$
17:35 <Derick> Nicole_Pygirls: it's tricky I think
17:35 <Nicole_Pygirls> "minutes" : { { "0" : { "0" : 14 , "1" : 12 "1" : 372, "2" : 334 }
17:35 <Nicole_Pygirls> ups
17:35 <Nicole_Pygirls> let me show you a link
17:36 <Derick> sorry - I have to go home now
17:39 tildes joined
17:40 fels joined
17:40 <Nicole_Pygirls> np
17:41 svm_invictvs joined
17:45 <Nicole_Pygirls> anyone can help me here with an aggregate $sum with nested arrays ?
17:47 <Nicole_Pygirls> https://github.com/mongodb/docs-ecosystem/blob/master/source/use-cases/pre-aggregated-reports-mmapv1.txt
17:47 <Nicole_Pygirls> thats what im trying to do
17:51 jeffreylevesque joined
17:57 ayogi joined
17:58 Derperperd joined
17:59 jrmg1 joined
18:00 silenced joined
18:04 point joined
18:05 av_ joined
18:14 StephenLynx joined
18:15 ayogi joined
18:20 synchroack joined
18:23 Waheedi joined
18:24 coudenysj joined
18:33 cybertoast joined
18:40 blizzow joined
18:41 Valery joined
18:48 svm_invictvs joined
18:54 benlue_ joined
18:56 Lynx joined
18:57 Sircle joined
18:58 <Sircle> mysql/PG/mongo/cassandra are usual choices? I heard that document type (nosql) have an additional overhead for aggregations as compared to sql databases?
19:04 StephenLynx joined
19:04 silenced joined
19:11 Sasazuka__ joined
19:18 Nicole_Pygirls joined
19:18 <Nicole_Pygirls> back
19:19 nanohest joined
19:23 tpayne joined
19:24 <tpayne> I need to change the username and password to my mongodb mlab hosted db, and then populate this change in all of my elastic beanstalk instances which would take 5 minutes. Is there anyway to do this wihout downtime? Perhaps adding 2 username/passwords and then once it's on the machines, remove the other one?
19:25 blizzow joined
19:26 igniting joined
19:28 gentunian joined
19:34 Siegfried joined
19:39 timg__ joined
19:43 e01 joined
19:44 igniting joined
19:48 jeffreylevesque_ joined
19:48 sunoano joined
19:49 average joined
19:49 average left
19:50 fels joined
19:57 Derperperd joined
20:05 tildes joined
20:14 ahr3n joined
20:17 jeffreylevesque joined
20:30 itaipu joined
20:33 realisation joined
20:46 tildes joined
20:51 Sasazuka_ joined
20:58 rendar joined
20:58 rendar joined
21:07 Nicole_Pygirls_ joined
21:08 <Nicole_Pygirls> Whats the best tool to test mongodb queries?
21:08 <Nicole_Pygirls> im using robomongo but it doesnt have highlighting
21:09 tildes_ joined
21:21 Sasazuka__ joined
21:24 tildes joined
21:24 Sasazuka_ joined
21:29 StephenLynx joined
21:31 tildes joined
21:34 jeffreylevesque joined
21:37 nanohest joined
21:39 Siegfried joined
21:42 tildes joined
21:45 artok joined
21:48 Liara- joined
21:49 okapi joined
21:51 geoffb joined
21:51 cybertoast joined
21:51 itaipu joined
21:54 philipballew joined
21:59 cybertoast joined
22:00 acrocity joined
22:08 gentunian joined
22:10 Siegfried joined
22:15 schmity joined
22:15 Sasazuka__ joined
22:25 laut left
22:32 Sasazuka_ joined
22:35 arti joined
22:40 Sasazuka__ joined
22:44 Sasazuka_ joined
22:55 AvianFlu joined
22:56 Tad3j joined
23:04 jeffreylevesque_ joined
23:05 Tad3j joined
23:10 arti joined
23:14 beauvolio joined
23:20 arti joined
23:21 rhqq left
23:42 realisation joined
23:44 Sasazuka__ joined
23:49 arti joined
23:49 cybertoast joined
23:51 arti joined
23:55 benlue joined