PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Wednesday the 23rd of September, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[02:17:58] <drdreed> is there any way to launch mongodb when webstorm launches?
[02:18:21] <StephenLynx> IMO, thats more related to webstorm
[02:18:26] <StephenLynx> whatever webstorm is
[02:18:52] <StephenLynx> or is that just a service in your system?
[02:19:06] <StephenLynx> in that case, it depends on your distro`s init system
[02:19:07] <drdreed> thats jetbrains ide
[02:19:40] <StephenLynx> I use one of these two:
[02:19:49] <StephenLynx> 1- a vm dedicated to mongo if I got plenty RAM
[02:20:06] <StephenLynx> 2- mongo installed as a service that starts on boot if I don`t have that much RAM
[02:20:30] <drdreed> ok
[02:22:43] <claytonzaugg> What would cause a collection to no longer display when it had once before? Meaning Products.find() no longer returns any products, but I can see in Robomongo clear as day, Products
[02:22:59] <StephenLynx> you connected to the wrong database.
[02:24:29] <claytonzaugg> What's crazy is that I can still see and access Users.find() and Classes.find(), but now all the sudden I can't access Products.find(). What's weird is that this happened both locally and also on my mongolab.com Products.find()
[02:25:27] <StephenLynx> a: the collectiond dropped
[02:25:31] <claytonzaugg> I was in the middle of trying to change the MONGO_URL to mongolab.com and that's the only thing I can figure caused the problem
[02:25:35] <StephenLynx> b: the documents got removed
[02:25:41] <StephenLynx> c: you are on a different database
[02:25:47] <StephenLynx> d: the database dropped
[02:26:36] <claytonzaugg> a: I can still see the collection both locally with robomongo and also on mongolabs site
[02:26:44] <claytonzaugg> b: please see answer for a.
[02:27:39] <claytonzaugg> c: is it possible that somehow meteor got messed up for just this ONE collection? Because I'm on the same DB as the others, the only one listed in robomongo and I can see it
[02:27:45] <claytonzaugg> d. please see answer to a.
[02:27:53] <StephenLynx> what do you see on your terminal?
[02:28:07] <StephenLynx> if over the terminal it is fine, then your application code is messed up
[02:28:31] <claytonzaugg> I haven't run terminal commands yet, what should I run to test? MongoD to start it up right?
[02:28:41] <StephenLynx> just a find on the collection
[02:28:46] <StephenLynx> to see whats actually in there
[02:30:27] <claytonzaugg> sorry not a MongoDB cli user, what syntax do I use to access the db on port 3001 so I can get to mongo console
[02:30:42] <acidjazz> claytonzaugg: mongo -h has some hints
[02:31:01] <claytonzaugg> thanks acidjazz
[02:31:36] <acidjazz> claytonzaugg: https://docs.mongodb.org/manual/reference/program/mongo/ down a little shows more
[02:35:05] <claytonzaugg> acidjazz, did you see my discussion above?
[02:35:24] <claytonzaugg> with StephenLynx
[02:37:03] <acidjazz> yea just do what he hes saying
[02:37:08] <acidjazz> connect to it via cli
[02:37:15] <acidjazz> then do use dbname;
[02:37:18] <claytonzaugg> I found it via cli
[02:37:20] <acidjazz> then db.Products.find(); etc
[02:37:30] <claytonzaugg> Did that and I found them from CLI
[02:37:31] <acidjazz> db.Users.find();
[02:37:36] <acidjazz> ok well then the DB is fine
[02:37:39] <acidjazz> and something else is wrong
[02:37:41] <claytonzaugg> so that means my app code got jacked somehow
[02:37:47] <claytonzaugg> f
[02:38:09] <claytonzaugg> Thank you for your help
[07:02:04] <mskalick> hello
[07:03:18] <mskalick> How long is mongodb supported (devoleped minor versions with fixes of bugs)? - for example version 2.6.x ...
[07:04:41] <joannac> mskalick: define supported?
[07:05:05] <joannac> also, context?
[07:08:51] <mskalick> how long will mongodb inc. release never versions in each branch...
[07:09:40] <mskalick> for example 2.4.14 was the last version in 2.4 branch si support for 2.4 ended
[07:11:53] <joannac> what's the context? are you trying to pick a version to deploy or something?
[07:16:56] <mskalick> no, it is for packaging for Fedora distribution - to know when the upstream stop support each version
[07:21:43] <joannac> mskalick: try https://www.mongodb.com/support-policy
[07:23:18] <mskalick> thanks
[08:15:16] <ak5> hi guys, I have a collection with some documents that either have or don't have an embedded document. I want to get all documents of this collection and know if the embedded document exists but not get the document itself
[08:15:37] <ak5> not get the embedded document itself (as it is quite large!)
[09:42:02] <Cuel> Hi, anyone know the issue here? http://pastebin.com/XNHn6NW3
[10:06:30] <receptor> on windows, is it enough to distribute mongod.exe to run the database server or does it depend on other distribution files?
[10:31:15] <synthmeat> #Node.js
[10:35:34] <idar> I have a query that have around 10 field which may be used or not. f.eks a,b,c is used and next time someone dsen't specify b then the query asks for a,b. Some are regex some are equal fields. The result is always sorted on a. Whats the best way to create an index for this? Will a,b,c,a index work?
[14:04:11] <mazzwopnam> I have a quick question. I have a MongoDB BSON string that I want to map to an object. it contains new BinData, therefore using Jackson does not work. is there a method to do this in another way?
[14:04:34] <mazzwopnam> the programming language that I am using is Java
[14:04:46] <cheeser> provide a (de)serializer for that
[14:05:39] <mazzwopnam> I have tried bson4jackson, but it does not seem to accept the BSON string
[14:05:48] <mazzwopnam> are there any deserializers that you can recommend?
[14:06:04] <cheeser> not offhand, no
[14:06:34] <cheeser> are you bound to using jackson? because the java drivers json parser should work just fine for that.
[14:07:23] <mazzwopnam> no, not necessarily. I was attracted to jackson, because it was supposed to be able to map the bson to an object
[14:30:15] <ayonix> hi, i'm trying to get a result similar to this: https://gist.github.com/ayonix/8ec801a01ad93d1ecffe with aggregations, but I'm kind of stuck there. Is it possible to get the wanted output or should I do the rest in the application?
[14:32:03] <mazzwopnam> I am trying to use the decode method of the org.bson.BSON class, but it doesn't seem to accept a String. it accepts a byte array. is it possible to convert a BSON string to a byte array?
[14:59:54] <Booster2ooo> Hello
[15:03:59] <Booster2ooo> I've got a little question about sorting multiple fields. I saw in the documentation it was simply a call to cursor.sort({ field1: [1|-1], field2: [1|-1] ... }) . When I try to sort a collection with "name" & "isActive" fields, by using .sort({ isActive: 1, name: 1}), it seems to sort only by "isActive" but not by name. Am I doing something wrong ? What whould be the solution ?
[15:23:15] <Booster2ooo> My bad, I was looking the exact same query in an other file. In the one I was testing, I commented the sort on the name filed, nvm -_-
[15:26:31] <StephenLynx> v:
[17:12:40] <odigem> hi
[17:12:48] <odigem> how to update all rows?
[17:13:40] <StephenLynx> update({},{your update},{multi:true})
[17:17:30] <odigem> StephenLynx: thx
[17:20:54] <odigem> StephenLynx: how to upsate where key not exists?
[17:21:01] <odigem> update*
[17:21:27] <StephenLynx> {yourfield:{$exists:false}},{uour update}
[17:21:39] <odigem> cool
[17:23:13] <odigem> StephenLynx: i try
[17:23:15] <odigem> update({'shape':{$exists:false}},{'shape':""},{multi:true})
[17:23:21] <odigem> "errmsg" : "multi update only works with $ operators"
[17:23:32] <StephenLynx> you forgot to use $set
[17:23:39] <odigem> yes
[17:23:40] <odigem> thx
[17:23:54] <StephenLynx> and you don't have to use string as the field in those cases
[17:24:01] <odigem> awesome syntax
[17:24:05] <StephenLynx> {shape:""} would work the same
[17:24:29] <StephenLynx> you only have to use as a string if you use dot notation or want to update a sub-field
[17:24:37] <StephenLynx> which is dot notation
[17:24:38] <StephenLynx> nvm :V
[17:31:48] <akoustik> i'm trying to update a document on "login" events. i would like to have datetimes "firstSeen" and "lastSeen". is there a way, with a single update, to only set "firstSeen" if it hasn't been set already? i imagine i can use $min to always set to the earlier date, just wondering if there's a way without using the comparison.
[19:00:01] <mopet> hi all
[19:00:26] <mopet> I have a question regarding BSON. how would I go about parsing a BSON string in Java?
[19:03:28] <cheeser> http://stackoverflow.com/a/12261133/1340183
[19:06:31] <mopet> the string that I have is a BSON string. I cannot parse it with a JSON parser
[19:15:25] <mopet> I am a little confused by how difficult it seems to be to parse a simple BSON string in Java
[19:17:50] <akoustik> mopet: look at the answer, "To convert bson to json, do..." below the one linked. is that not working for you?
[19:17:57] <StephenLynx> do you REALLY need to parse a bson string?
[19:19:16] <cheeser> mopet: what is a bson string? bson is, by definition, binary not text.
[19:19:38] <StephenLynx> he might mean "a string representing bson data"
[19:19:43] <mopet> the string contains new BinData()
[19:19:56] <cheeser> that would be mongodb's extended json
[19:19:56] <StephenLynx> like "0110" would represent 110 in binary.
[19:20:03] <mopet> I suppose that may be a more accurate description
[19:20:06] <cheeser> which the driver can parse
[19:20:20] <cheeser> did you even try the solution suggested?
[19:20:58] <mopet> you make a good point
[19:21:10] <mopet> I have not. I will try it
[19:21:26] <mopet> thanks for the help. will try the solution tomorrow
[19:47:52] <npjonath> Hi everyone, I'm stuck into a simple problem of request with mongodb. Is there someone who could give me a hint for this problem ? http://plnkr.co/edit/SYEXbPtBjVyGSOpde8g9?p=catalogue
[20:04:20] <npjonath> I'm trying to get all mongodb modelObject where modelObject.events.obj === 'CONSTANT_VALUE'. events is a list of json object encapsulate in my modelObject. I have try modelObject.find({"events":{"obj":"CONSTANT_VALUE"}})... but it's seems to not working
[20:10:36] <m3t4lukas> npjonath: use dot notation
[20:15:59] <m3t4lukas> npjonath: oh, no, sry was wrong. Use element match: modelObject.find({'events': {'$elementMatch': {'obj': 'CONSTANT_VALUE'}}})
[20:16:16] <m3t4lukas> this should get you what you need
[20:17:12] <m3t4lukas> npjonath: you can obtain further information here: http://docs.mongodb.org/master/reference/method/db.collection.find/
[21:06:37] <npjonath> m3t4lukas: thanks ^^
[21:29:27] <m3t4lukas> npjonath: did it work?
[22:54:59] <bperry> can you run mongod in the foreground?
[22:57:51] <cheeser> yes
[22:58:00] <cheeser> that's the default actually
[22:59:00] <bperry> ah I see
[22:59:12] <bperry> I hadn't actually tried, was going by what --help printed
[22:59:32] <bperry> googled, saw stuff about indexing in the fg but nothing about it running that way
[22:59:46] <bperry> danke
[23:00:10] <cheeser> bitte